### Setup project directory on Windows Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/installation.html Commands to create a project directory and install the toolkit using uv. ```bash > mkdir translate-work > cd translate-work > uv venv > uv pip install translate-toolkit ``` -------------------------------- ### Install from source Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/installation.html Commands for installing the toolkit from the local source directory. ```bash $ uv pip install . ``` -------------------------------- ### Install via uv Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/installation.html Recommended method for installing the toolkit using the uv package manager. ```bash uv pip install translate-toolkit ``` -------------------------------- ### Install Dependencies Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/developers/developers.html Use uv to sync dependencies and create a virtual environment. ```bash uv sync --all-extras --dev ``` -------------------------------- ### Install test dependencies Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/developers/testing.html Install all required and optional dependencies for the test suite. ```bash $ uv sync --all-extras --dev ``` -------------------------------- ### Verify installation Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/installation.html Command to check the currently installed version of the toolkit. ```bash $ prop2po --version prop2po 3.19.19 ``` -------------------------------- ### Install via Linux package managers Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/installation.html Commands for installing the toolkit on various Linux distributions. ```bash # Debian / Ubuntu apt install translate-toolkit # Fedora / RedHat dnf install translate-toolkit # openSUSE zypper install translate-toolkit ``` -------------------------------- ### Quickstart workflow commands Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/guides/using_pofilter.html A sequence of commands for the standard pofilter and pomerge workflow. ```bash pofilter -l pofilter -i existing_files/ -o errors/ [-t specific tests] [--excludefilter don't perform specific tests] vim errors/*.po pomerge -i errors/ -o existing_files/ -t existing_files/ cvs diff -u existing_files/ > x.diff vim x.diff cvs ci existing_files/ ``` -------------------------------- ### Java properties file example Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/properties.html A basic example of key-value pairs in a Java properties file format. ```properties editmenu.label = "Edit" saveas.label = "Save As" ``` -------------------------------- ### Example command execution Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/odf2po.html Example commands for converting an ODT file to PO and back to ODT. ```bash odf2po english.odt english_french.po po2odf -t english.odt english_french.po french.odt ``` -------------------------------- ### Clone and setup development environment Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/developers/contributing.html Commands to clone the repository and set up the development environment using uv. ```bash git clone https://github.com/translate/translate.git cd translate uv sync --all-extras --dev ``` -------------------------------- ### Output format examples Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pocount.html Sample output for different reporting formats. ```text avmedia/source/viewer.po type strings words (source) words (translation) translated: 73465 ( 99%) 538598 ( 99%) 513296 fuzzy: 13 ( 0%) 141 ( 0%) n/a untranslated: 53 ( 0%) 602 ( 0%) n/a Total: 73531 539341 513296 ``` ```text Filename, Translated Messages, Translated Source Words, Translated Target Words, Fuzzy Messages, Fuzzy Source Words, Untranslated Messages, Untranslated Source Words, Review Messages, Review Source Words avmedia/source/viewer.po, 1, 3, 3, 0, 0, 4, 22, 1, 3 ``` ```text test-po/fuzzy.po strings: total: 1 | 0t 1f 0u | 0%t 100%f 0%u ``` ```text test-po/fuzzy.po source words: total: 3 | 0t 3f 0u | 0%t 100%f 0%u ``` -------------------------------- ### .properties file formatting examples Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/releases/0.10.html Demonstrates the change in .properties file output formatting to preserve spacing around the equal sign. ```properties # Previously if the template had property = value ``` ```properties # We output property=translation ``` ```properties # We will now output property = translation ``` -------------------------------- ### Format command line examples Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/developers/styleguide.html Use the console block type for command line instructions, including prompts and comments. ```console $ cd docs $ make html # Build all Sphinx documentation $ make linkcheck # Report broken links ``` -------------------------------- ### Install uv on Windows Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/installation.html Command to install the uv package manager on Windows via PowerShell. ```powershell powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ``` -------------------------------- ### Conversion Workflow Examples Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/ini2po.html Common command sequences for creating POT files, recovering existing translations, and converting back to INI. ```bash ini2po -P ini/ pot/ ``` ```bash ini2po -t lang/ zu/ po-zu/ ``` ```bash po2ini -t lang/ po-zu/ zu/ ``` -------------------------------- ### WiX v3 Localization File Example Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/wxl.html Demonstrates the WiX v3 structure where translatable strings are defined as element content. ```xml &Voltar Cancelar ``` -------------------------------- ### Python Brace Format Example Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pofilter_tests.html Demonstrates the syntax for Python brace formatting used in translation strings. ```python 'the {} {0} hungry {insect}'.format('very', insect='caterpillar') # --> 'the very very hungry caterpillar' ``` -------------------------------- ### Customize element and attribute names Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/flatxml.html Example demonstrating the use of custom element and attribute names, including namespaces. ```xml Hello World! Translated value. ``` -------------------------------- ### WiX v4 Localization File Example Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/wxl.html Demonstrates the WiX v4 structure where translatable strings are defined using the Value attribute. ```xml ``` -------------------------------- ### Example review comment Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/guides/using_pofilter.html Shows the format for an entry marked for review within a PO file. ```text # (review) - wrong word for gallery chosen ``` -------------------------------- ### Customize indentation styles Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/flatxml.html Example showing how indentation can be customized, including spaces, tabs, or no indentation. ```xml This file uses 8 spaces for indent Tabs can also be used; but this is limited to the Python API at this point No indent (all in one line) is also supported End-of-file *always* has a LF to satisfy VCS ``` -------------------------------- ### Example of a simple text document structure Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/text.html A sample text file demonstrating how the converter groups content into units based on spacing. ```text Heading ======= Paragraph One Paragraph Two: * First bullet * Second bullet ``` -------------------------------- ### Segmenting an entire project directory Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/posegment.html Example of segmenting all files within a directory for project-level translation memory. ```bash posegment af/ af-segmented/ ``` -------------------------------- ### Demonstrate Unified Storage Conversion API Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/base_classes.html Example of converting between translation formats by passing a store object directly to another store constructor, relying on a shared base API. ```python >>> po_store = POStore(filecontent) >>> print(bytes(po_store)) msgid "bleep" msgstr "blorp" >>> xliff_store = XliffStore(po_store) >>> print(bytes(xliff_store)) bleep blorp ``` -------------------------------- ### Example of generated header field Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/symb2po.html Example of a header field that may appear in generated files. ```text Description : Localisation File : English ``` -------------------------------- ### YAML Boolean non-conformance example Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/yaml.html Example of a boolean value that may not be correctly handled during round-trip operations. ```yaml foo: True ``` -------------------------------- ### Initialize PO Files with Templates Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pot2po.html Initializes new PO files using existing translations from a previous version as templates. ```bash pot2po -t zu-1.0.1 pot-2.0.2 zu-2.0.2 ``` -------------------------------- ### Basic command usage Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/fluent2po.html General syntax for running the fluent2po conversion tool. ```bash fluent2po [options] ``` -------------------------------- ### Preserve non-resource elements Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/flatxml.html Example demonstrating how non-resource elements and attributes are preserved during conversion. ```xml This needs to be translated 42 Some important string ``` -------------------------------- ### poswap Translation Examples Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/poswap.html Common operations for swapping source languages and reversing the process. ```bash poswap nl.po nl-af.po ``` ```bash poswap --reverse nl.po -t nl-af.po af.po ``` ```bash poswap -i fr/ -t ku/ -o fr-ku/ ``` ```bash poswap --reverse -i fr/ -t fr-ku/ -o en-ku/ ``` -------------------------------- ### Create POT Files Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/flatxml2po.html Converts all .xml files in the source directory to Gettext POT files. ```bash flatxml2po -P lang/en pot/ ``` -------------------------------- ### Access Tool Help Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/general_usage.html Display available commands and options for any specific tool. ```bash moz2po --help ``` -------------------------------- ### Segmenting a single PO file Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/posegment.html Example of segmenting a specific Pidgin translation file. ```bash posegment pidgin-af.po pidgin-af-segmented.po ``` -------------------------------- ### Create POT files from properties Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html Use the -P flag to generate POT files instead of standard PO files from properties sources. ```bash prop2po -P properties pot ``` ```bash prop2po -P file.properties file.pot ``` -------------------------------- ### Displaying phase help Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/phase.html Command to view available commands and options. ```bash phase --help ``` -------------------------------- ### Counting translations in a directory or files Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pocount.html Examples of counting all files in a directory or specific file patterns. ```bash pocount project/ ``` ```bash pocount *.po ``` ```bash pocount $(find . -name "*.properties.po") ``` -------------------------------- ### Command Line Usage Syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/wxl2po.html Basic command line syntax for wxl2po and po2wxl conversion tools. ```bash wxl2po [options] po2wxl [options] [-t ] ``` -------------------------------- ### Convert ODF to XLIFF Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/odf2xliff.html Example command to generate an XLIFF file from an ODT source document. ```bash odf2xliff english.odt english_français.xlf ``` -------------------------------- ### Basic usage of posegment Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/posegment.html General syntax for running the posegment command. ```bash posegment [options] ``` -------------------------------- ### Example pofilter marker format Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/guides/using_pofilter.html The format used by pofilter to annotate errors within PO files. ```text # (pofilter) - ``` -------------------------------- ### Define translation sections Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/guides/using_csv2po.html Example directory naming convention for splitting work among multiple translators. ```text e.g. po-filtered-dir-1 po-filtered-dir-2 or po-filtered-dir-bob po-filtered-dir-mary ``` -------------------------------- ### Basic Usage Syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pot2po.html General command structure for running the pot2po conversion. ```bash pot2po [options] ``` -------------------------------- ### Convert TS to POT Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/ts2po.html Create a POT file from a Qt .ts file. ```bash ts2po -P psi.ts psi.pot ``` -------------------------------- ### Define Plain TOML structure Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/toml.html Example of key-value pairs and nested tables in a plain TOML file. ```toml # Welcome message welcome = "Welcome to our application" [settings] app_name = "My App" description = "A great application" [settings.advanced] timeout = "30 seconds" ``` -------------------------------- ### Define Fluent messages Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/fluent.html Example of basic message definitions, variable interpolation, and attributes in a .ftl file. ```fluent # Simple message hello = Hello World! # Message with a variable greeting = Hello { $name }! # Message with attributes login-input = .placeholder = email@example.com .aria-label = Login input .title = Login ``` -------------------------------- ### PHP Blank Array Initialization Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/php.html Demonstrates initializing an empty array and filling it later. ```php array( "two" => "dous", ), ); ``` -------------------------------- ### Add normal comments Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/po.html Standard comments in PO files start with a hash symbol followed by a space. ```PO # this is another comment ``` -------------------------------- ### Clone the Repository Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/developers/developers.html Initial step to download the source code from GitHub. ```bash git clone https://github.com/translate/translate.git cd translate ``` -------------------------------- ### Basic usage syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/po2tmx.html The standard command structure for executing the po2tmx conversion. ```bash po2tmx [options] --language ``` -------------------------------- ### Identify review flags in PO files Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pofilter_tests.html Example of how review comments are structured in a PO file for the isreview test. ```text # (review) reason for review # (pofilter) testname: explanation for translator ``` -------------------------------- ### Command Line Usage Syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/resx2po.html Basic command structure for converting files between .resx and PO formats. ```bash resx2po [options] po2resx [options] -t ``` -------------------------------- ### PHP Nowdoc Syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/php.html Demonstrates nowdoc string syntax. ```php po2flatxml [options] [-t ] ``` -------------------------------- ### Example .resx data entry Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/resx.html Shows the structure of a data entry including a key, value, and combined developer/translator comments. ```xml hello world Optional developer comment about the string [Translator Comment: Optional translator comment] ``` -------------------------------- ### Define a single-level Flat XML structure Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/flatxml.html Basic example of a single-level XML structure using attributes to identify resources. ```xml Hello World! Translated value. ``` -------------------------------- ### Run Tests Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/developers/developers.html Execute the test suite using the provided makefile. ```bash make test ``` -------------------------------- ### Activate environment and verify on Windows Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/installation.html Commands to activate the virtual environment and check the toolkit version. ```bash > .venv\Scripts\activate > po2prop --version ``` -------------------------------- ### Set language attribute on an iCalendar entry Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/ical.html Example of setting the LANGUAGE attribute on a SUMMARY entry within an iCalendar file. ```text SUMMARY:LANGUAGE=af;New Year's Day ``` -------------------------------- ### Create POT Files Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/rc2po.html Converts .rc files from a source directory into Gettext POT files. ```bash rc2po -P lang/ pot/ ``` -------------------------------- ### Command Line Usage Syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/mozlang2po.html Basic command structure for converting between Mozilla .lang and PO formats. ```bash mozlang2po [options] po2mozlang [options] -t ``` -------------------------------- ### INI File Format Examples Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/ini2po.html Supported INI file structures including various comment styles and key-value delimiters. ```ini [Section] ; a comment a = a string ``` ```ini [Section] # another comment b : a string ``` ```ini [Section] ; a comment a = a string # another comment b : a string c:'other example with apostrophes' d:"example with double quotes" ``` -------------------------------- ### Create POT files from .resx Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/resx2po.html Converts all .resx files in a directory to Gettext POT files. ```bash resx2po -P resx/ pot/ ``` -------------------------------- ### Basic poclean usage Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/poclean.html The standard command syntax for running the poclean tool. ```bash poclean ``` -------------------------------- ### Basic usage syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/arb2po.html General command structure for converting ARB files to PO format. ```bash arb2po [options] ``` -------------------------------- ### Create POT File Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/sub2po.html Generate a POT file from a subtitle file. ```bash sub2po -P SUBTITLE_FILE subtitles.pot ``` -------------------------------- ### Define Go i18n TOML structure Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/toml.html Example of pluralized strings using CLDR categories in Go i18n TOML format. ```toml [reading_time] one = "One minute to read" other = "{{ .Count }} minutes to read" [items_count] zero = "No items" one = "One item" two = "Two items" few = "A few items" many = "Many items" other = "{{ .Count }} items" ``` -------------------------------- ### Standard JSON structure example Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/json.html A basic representation of a JSON object containing nested address information and an array of phone numbers. ```json { "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": 10021 }, "phoneNumbers": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ] } ``` -------------------------------- ### Run project tests Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/developers/contributing.html Command to execute the project's test suite. ```makefile make test ``` -------------------------------- ### Pretranslate with template and translation memory Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pretranslate.html Example of pretranslating files using an old translation template and a specific translation memory file. ```bash pretranslate -t zu-1.0.1 -tm zu_tm.po zu-2.0.2 zu-2.0.2-translated ``` -------------------------------- ### Run pomigrate2 command Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pomigrate2.html Basic syntax for executing the pomigrate2 migration process. ```bash pomigrate [options] ``` -------------------------------- ### Translatable meta tags in HTML Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/html.html Example of meta tags that are automatically extracted for translation, excluding technical tags like og:image. ```html ``` -------------------------------- ### Convert PO to Wordfast TM Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/po2wordfast.html Example command to convert a specific PO file into a Wordfast translation memory file for the Xhosa language. ```bash po2wordfast -l xh-ZA browser.po browser.txt ``` -------------------------------- ### Convert XLIFF to ODF Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/odf2xliff.html Example command to create a translated ODF file using an original ODF template and an XLIFF translation file. ```bash xliff2odf -t english.odt english_français.xlf français.odt ``` -------------------------------- ### Command line usage syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/popuretext.html General syntax for running the popuretext command. ```bash popuretext <-P pot-dir|po-dir> [accelerator] ``` -------------------------------- ### Apple XLIFF Plural Representation Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/xliff.html Example of the Apple XLIFF 1.2 variant structure using specific ID naming conventions for plural forms. ```xml NSStringPluralRuleType NSStringPluralRuleType d d One item One item %d items %d items ``` -------------------------------- ### Command line usage for txt2po and po2txt Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/txt2po.html Basic syntax for converting plain text to PO files and vice versa. ```bash txt2po [options] po2txt [options] [-t ] ``` -------------------------------- ### Basic Command Usage Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/ini2po.html Standard command syntax for ini2po and po2ini conversion tasks. ```bash ini2po [options] po2ini [options] -t ``` -------------------------------- ### Preserve significant whitespace Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/flatxml.html Example showing that whitespace within value elements is treated as significant, similar to xml:space="preserve". ```xml The format assumes xml:space="preserve". There is no need to specify it explicitly. This assumption only applies to the value element; not the root element. ``` -------------------------------- ### Blanking translations with podebug Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/podebug.html Use the blank rewriter to strip all translations and clear fuzzy flags, which is useful for creating new templates or starting fresh translations. ```bash podebug --rewrite=blank fr.po new-lang.po ``` -------------------------------- ### Basic Command Usage Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/mdx2po.html Standard syntax for running the mdx2po and po2mdx conversion commands. ```bash mdx2po [options] po2mdx [options] -i -t -o ``` -------------------------------- ### Copy POT to PO Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/ical2po.html Prepares a PO file for translation by copying the generated POT file. ```bash cp ical.pot ical-af.po ``` -------------------------------- ### PO Format Quoting and Escaping Example Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/quoting_and_escaping.html Demonstrates multiline string handling and escaping of special characters like newlines, double quotes, and backslashes in PO files. ```text msgid "" "This is a long string with a \n newline, a \" double quote, and a \\ backslash." "There is no space between the . at the end of the last sentence " "and the T at the beginning of this one." ``` -------------------------------- ### Generate a basic terminology file Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/poterminology.html Creates a terminology file from POT templates without translations. ```bash poterminology Pootle/po/pootle/templates/*.pot . ``` -------------------------------- ### Swap translation languages using poswap Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/api/tools.html Examples of using the poswap command-line tool to swap source and target languages, including intermediate mode for maintaining original source references. ```bash poswap -i fr/ -t ku -o fr-ku ``` ```bash poswap --reverse -i fr/ -t fr-ku -o en-ku ``` ```bash poswap --intermediate -t en/ es/ es-qu/ ``` -------------------------------- ### PHP Array Syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/php.html Demonstrates standard array declaration. ```php 'value', 'name2' => "value2", "key1" => 'value3', "key2" => "value4", ); ``` -------------------------------- ### Create a PO compendium Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/guides/creating_a_terminology_list_from_your_existing_translations.html Generates a single terminology file from existing PO files while ignoring case and specific accelerator keys. ```bash ~/path/to/pocompendium -i -su zulu-gnome-glossary.po -d zulu-short-clean ``` -------------------------------- ### Convert DokuWiki content to PO and back Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/txt2po.html Retrieves raw DokuWiki content, creates a POT file, and generates a translated text file using the original as a template. ```bash wget https://www.dokuwiki.org/dokuwiki?do=export_raw -O txt2po.txt txt2po --flavour=dokuwiki -P txt2po.txt txt2po.pot # edit txt2po.pot po2txt -t txt2po.txt fr.po fr.txt ``` -------------------------------- ### Basic usage syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/pogrep.html General command structure for executing the pogrep tool. ```bash pogrep [options] ``` -------------------------------- ### PHP Variable Syntax Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/php.html Demonstrates simple variable assignment. ```php po2ical [options] -t ``` -------------------------------- ### Create PO files with templates Source: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/prop2po.html Extract messages using a reference directory as a template, utilizing msgctxt to handle duplicates. ```bash prop2po --duplicates=msgctxt -t reference zu zu-po ```