![]() You can then use it in your terminal, and it will register several action helpers, such as moving to the next untranslated message, adding labels, or copying messages from different msgids. If you are a Vim power user, you can integrate PO automation tasks using the po.vim plugin. Here, we will explore the most useful ones: Vim + po.vim plugin If you are not happy working with poEdit or you do not like the interface, there are quite some other options. Poedit is a well-known desktop application that allows manipulating PO files in your computer environment, coming with both a free and pro version the latter offers more advanced features, such as online suggestions and machine translation. Are There Any Good Alternatives to Poedit Out There? Having said that, using the msgcat tool should be the preferred choice for merging two PO files together. This is why it should be mainly used to update existing translations taken from a definition file into a destination file that may contain old translations. When merging two files, the tool will only move translations and comments from the first file to the destination file while discarding any existing translations and comments of the second one. 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 |