]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - HOWTO.md
Translated using Weblate (Swedish)
[text-madewithcc.git] / HOWTO.md
index 8a664dbcf7deb5c4119b312250fe63e4f39f73ed..0de9858da361cd59e12e799d4f4ba926ba1c614a 100644 (file)
--- a/HOWTO.md
+++ b/HOWTO.md
@@ -45,6 +45,16 @@ Inside the `po` directory, we have one directory per target _locale_
 are stronger, such as Portuguese (would probably be `po/pt_BR`
 vs. `po/pt_PT`).
 
 are stronger, such as Portuguese (would probably be `po/pt_BR`
 vs. `po/pt_PT`).
 
+## Quick and easy: How to rebuild the sources
+
+You don't really need to follow this script; it's all scripted in a
+`Makefile`. To update the `.pot` (translation template) file, just
+run:
+
+    `make pot`
+
+That is enough to get you to the _Editing the Gettext files_ section.
+
 ## Markdown conversion
 
 Markdown is an easy to edit format, with very little markup, and
 ## Markdown conversion
 
 Markdown is an easy to edit format, with very little markup, and
@@ -57,6 +67,18 @@ We use Pandoc to convert the `odt` file into Markdown:
 We also include the source Markdown file, mostly as documentation, in
 the Git repository root directory.
 
 We also include the source Markdown file, mostly as documentation, in
 the Git repository root directory.
 
+### Markdown fixup
+
+The generated Markdown file is correct, but somewhat _dirty_. I came
+up with a quick-and-dirty(er) script to fix several issues,
+`fixup.rb`, and intend to update it as needed:
+
+    ruby fixup.rb source.md dest.md
+
+I still need to add to this fixup the needed markup so that the built
+material reflects the book's structure. It will happen :-) It will, of
+course, happen earlier if you send me some patches!
+
 ## Extracting strings for translation
 
 Gettext works by presenting each particular string to be edited. We
 ## Extracting strings for translation
 
 Gettext works by presenting each particular string to be edited. We
@@ -87,3 +109,44 @@ been accepted as a hosted project
 [hosted project in the Weblate online translation coordination service](https://weblate.org/projects/madewithcc). Weblate
 is completely based on free software tools, we invite you to get
 familiar with their interface.
 [hosted project in the Weblate online translation coordination service](https://weblate.org/projects/madewithcc). Weblate
 is completely based on free software tools, we invite you to get
 familiar with their interface.
+
+## Building the translated Markdown file
+
+`po4a` provides a tool to integrate the translation back into a
+Markdown document, `po4a-translate`. I have only made first attempts
+with it, and we need to find ways to do several improvements. However,
+the following command will give you a good glimpse on how your
+finished translation looks:
+
+    po4a-translate -f text -m MadewithCreativeCommonsmostup-to-dateversion.md -p po/es/mwcc.po -l MadewithCreativeCommonsmostup-to-dateversion.es.md -l MadewithCreativeCommonsmostup-to-dateversion.es.md -L utf8 -M utf8 -k 20
+
+What does it all mean?
+
+    -f text
+
+The base format to/from which the translation is done is plain text.
+
+       -m MadewithCreativeCommonsmostup-to-dateversion.md
+
+The name of your source document.
+
+       -p po/es/mwcc.po
+
+Which translation to use. In this case, Spanish translation.
+
+       -l MadewithCreativeCommonsmostup-to-dateversion.es.md
+
+Filename to use for the created translation. Do note that I'm
+specifying a name that implies Spanish.
+
+       -L utf8 -M utf8
+
+Which character sets to use, both for the source and destination
+files.
+
+       -k 20
+
+Minimum translation percentage for which to produce output. The
+default is 80% — To get a glimpse of your work in the early stages of
+a translation, use `-k` with a value smaller than the percentage you
+have achieved.