File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Advantages
2121- gettext is a standard format, which can be edited using any text editor
2222 or GUI editors such as `Poedit <https://poedit.net/ >`_. This can be significant
2323 as it provides a lot of tools for translators, such as marking outdated
24- strings, finding strings that haven't been translated etc.
24+ strings, finding strings that haven't been translated, etc.
2525- gettext is supported by translation platforms such as
2626 `Transifex <https://www.transifex.com/ >`_ and `Weblate <https://weblate.org/ >`_,
2727 which makes it easier for people to collaborate to localization.
@@ -294,6 +294,20 @@ For example:
294294 tr("Shop", "Main Menu")
295295 tr("Shop", "In Game")
296296
297+ In a gettext PO file, a string with a context can be defined as follows:
298+
299+ ::
300+
301+ # Example of a string with a translation context.
302+ msgctxt "Main Menu"
303+ msgid "Shop"
304+ msgstr ""
305+
306+ # A different source string that is identical, but with a different context.
307+ msgctxt "In Game"
308+ msgid "Shop"
309+ msgstr ""
310+
297311Updating PO files
298312-----------------
299313
You can’t perform that action at this time.
0 commit comments