![]() ![]() Note that there is also the msgmerge tool that can combine two PO files together, but it has a 'nasty' side effect. more-than=: allow only messages with more than NUM conflicting definitions this is used to extract multiple conflicting definitions in a new file for further processing by default, NUM is 0. less-than=: allow only messages with less than NUM conflicting definitions by default, NUM is unlimited so it allows all messages to pass through. If you want to combine multiple msgids, we have an option to filter common messages based on a rule. s, -sort-output: to sort all keys by msgid. no-location: to strip filename or line comments, use-first: to take the first available translation for each message even if it's empty and don’t merge them together, The tool offers several options for combining those files together. To make this clearer with an example, let’s say we have two files, first.po and second.po, and we want to combine them together into a third.po file: msgcat first.po second.po -o third.po It’s a command-line tool with the following invocation signature: msgcat. Afterwards, you have access to more than 10 tools, including msgcat. ![]() You can install the gettext tooling on Mac via homebrew, on Windows via pre-compiled libraries, and on Linux via the relevant package manager. The msgcat tool that comes with the installation of the gettext tooling into our system offers such functionality. If you maintain more than two PO files, and you want to combine them together, without introducing any conflicts, then you may need to use another tool to help with that process. PO files are used in i18n specifically for the gettext tool for storing message translations for a specific locale.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |