Translate the message text in a copy of your PO catalog, leaving its lookup keys, format arguments and plural structure intact. On a Mac with the required languages downloaded you can translate the selected prose locally, compile the result with GNU gettext, and exercise the compiled catalog with known names and numbers before handing it to the application developer.

Prepare a catalog you can safely change

Start with the editable PO for the target language, preferably one supplied by the project. A POT file is a template for creating catalogs. An MO file is a compiled artifact used for lookup. If your only file is an MO, ask for the corresponding editable PO before taking on a maintained translation. The MO is useful for inspecting the messages the application can load, while edition history, notes to the translator and some decisions still awaiting review belong in the source catalog.

Keep the incoming file in one folder and create a working copy in another. Record the language, project version and catalog domain if the maintainer supplies one. A perfectly valid Spanish catalog for an older version of an application may lack the current message keys. Likewise, translating a file called interface.po cannot tell you that the application actually loads that domain. The person supplying the catalog can normally identify one screen where a particular source message appears. Ask for that screen or an example input before you start.

Use a UTF-8 plain-text editor or a PO editor that works offline. Verify that GNU gettext is available before leaving the network. In Terminal, run the following commands. If either program is missing, install it using the project’s normal toolchain while connected. Once installed, compiling a local PO file does not require contacting a translation service.

msgfmt --version
msgunfmt --version

For the translation step, open System Settings on the Mac and choose General, Language & Region, then Translation Languages. Download the source and target languages. On-Device Mode allows translations to use downloaded languages while connected. For an offline rehearsal, disconnect Wi-Fi and any other active network connection, select a new sentence in a local TextEdit document, Control-click it, and choose Translate. If a PO editor does not offer system translation on selected text, use TextEdit as a scratchpad and return only the checked wording to the catalog.

Read one entry as the application will read it

A normal entry pairs a source message with its translation. The source text after msgid is a key used at runtime. Changing “Save file” to “Save File” in that field creates a different key. If the application still asks for the original spelling, it may fall back to English. Put the target wording in msgstr and leave the source key exactly as supplied. When two like-looking entries have different msgctxt values, keep those contexts separate. “Open” used as a verb on a button can need different wording from “Open” used as a status.

Read the comments above an entry before translating. A programmer may have identified an argument as the name of a source folder rather than the name of a person. A source reference can point to the view that displays the message. A line beginning with a hash and a comma contains flags. In particular, c-format tells gettext to consider the string a C-style format string when running the corresponding checks. The placeholders can express text, integers, argument positions and literal percent signs. Preserve the meaning of the arguments as well as their types.

Ask the translation facility for natural wording, then reconstruct the final message in the editor. For example, if you translate “Copy from SOURCE to TARGET” in a scratchpad, keep a separate note identifying the actual argument positions. Replace SOURCE and TARGET with the correct format arguments in the final string. Translating only individual words can lose grammatical agreement; translating an entire raw format expression can alter the punctuation the program interprets. A readable scratch sentence plus a separate identifier check avoids both problems.

Compile a small Spanish example before tackling the catalog

Save this synthetic catalog as example-es.po in an empty test folder. Its header states the encoding and the plural rule for this Spanish example. The singular and plural forms belong to one entry with two translations. The following entry also has two arguments, both strings. It illustrates a case where syntax alone cannot detect an accidental exchange of the source and destination.

msgid ""
msgstr ""
"Project-Id-Version: Casebook 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-01 12:00+0000\n"
"PO-Revision-Date: 2026-01-02 12:00+0000\n"
"Last-Translator: Example Editor\n"
"Language-Team: Spanish\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#, c-format
msgid "%d file"
msgid_plural "%d files"
msgstr[0] "%d archivo"
msgstr[1] "%d archivos"

#, c-format
msgid "Copy from %s to %s"
msgstr "Copiar de %s a %s"

In Terminal, move into the test folder and run the two commands below. Pick an empty output folder or use new output names. Successful compilation typically writes the MO and returns control to the shell. Inspecting the MO afterwards helps establish what was actually compiled. Work from the compiler’s exit status and messages for your file. An MO left over from a previous successful attempt is poor evidence about a later failed run.

msgfmt --check --check-format -o example-es.mo example-es.po &&
  msgunfmt -o inspected-es.po example-es.mo

Open inspected-es.po. Look for the singular and plural translations and the source-to-destination phrase. The order of entries or the arrangement of quoted lines may differ from the original PO. The compiler has produced a runtime catalog. Review the message keys, translations and header information that matter to the application rather than requiring the decompiled text file to match the editable file byte for byte.

Check the values the reader will actually see

If Python 3 is available, you can perform a compact lookup test without modifying system locale preferences or installing a catalog into a real application. Run the following example from the directory containing example-es.mo. It opens that exact file, asks for the singular or plural form for three quantities, and supplies distinctive strings to the directional message. The fixture uses ordinary sequential arguments for compatibility with Python’s percent formatting in this demonstration.

import gettext
with open("example-es.mo", "rb") as stream:
    catalog = gettext.GNUTranslations(stream)
for count in (0, 1, 2):
    template = catalog.ngettext("%d file", "%d files", count)
    print(template % count)
print(catalog.gettext("Copy from %s to %s") % ("ORIGEN-A", "DESTINO-B"))

The expected lines for this fixture are “0 archivos,” “1 archivo,” “2 archivos,” and “Copiar de ORIGEN-A a DESTINO-B.” Count zero matters because checking only one and two leaves one branch of the business situation unexamined. Substitute values your users would recognize as different roles. With two identical test folder names the sentence would look the same even if a human translator had reversed the direction.

For other languages, use the plural rule supplied for that locale and choose examples that exercise its forms. The number of distinct forms in Spanish is not a template for every catalog. Some source messages share an English plural while the target language needs more distinctions. Review every indexed target form in the editable PO and verify the unexpected counts with a fluent reviewer or the project’s language lead.

Deliberately break a disposable copy

Duplicate example-es.po as missing-argument.po. In only the last translation, remove one occurrence of the string placeholder so that the message still reads like Spanish but has only one argument. Leave the c-format flag and the two arguments in the source message. Compile the damaged copy to a different output name with the same check options. GNU gettext should report the format mismatch and return a failure status. Read the diagnostic for the actual entry. The wording can differ across installed releases.

Then restore both placeholders but write a deliberately reversed direction, such as “Copiar a %s desde %s.” A structural format check may now pass because both placeholders have the expected type. Repeat the directional test and read which folder receives the copy. This illustrates why a successful compiler check is only one part of accepting a translation. The application could otherwise give a perfectly grammatical instruction that sends the reader in the wrong direction.

When a real target language requires a different word order, consult the formatting convention actually used by that application. A C-style positional string may use the second string argument as %2$s and the first as %1$s. A project using a different message format can have different rules. Preserve the flag for the format the program uses and exercise positional examples in that runtime. Python’s simple percent operator in the small fixture above uses sequential substitution and is not a substitute for a C-runtime positional-format test.

Keep context visible when the same English word appears twice

For a last review, pick an English word that can mean two things in the interface. A window heading that says “Draft” can name an unfinished document. A button elsewhere might use the same word as a verb. If the catalog supplies two contexts for those entries, search the compiled inspection file for both contexts and look for the corresponding Spanish choices. If the application supplies only one shared message key, editing a second identical key into the catalog does not tell the application when to select it. Report the two uses to the maintainer, identifying the screens and explaining the distinction you need. That gives the maintainer enough information to add a context in the application if one is required.

Trace two identical English buttons through their contexts

A useful project test contains one caption that looks the same in English but serves two different controls. Extend a copy of the Spanish fixture with the four entries below. They represent two uses of “Open,” an untranslated message, and a deliberately fuzzy message. The wording is illustrative. Keep this rehearsal catalog separate from the one you will deliver.

msgctxt "command"
msgid "Open"
msgstr "Abrir"

msgctxt "door-state"
msgid "Open"
msgstr "Abierta"

msgid "No owner assigned"
msgstr ""

#, fuzzy
msgid "Archive all revisions"
msgstr "Archivar una revisión"

Compile the augmented fixture under a fresh MO name, as before. On Python 3.8 or later the translations object provides pgettext for context-sensitive lookup. The two context strings below are plain case-sensitive keys. A reader running this test does not have to change the language of the Mac or any other applications.

import gettext
with open("review-es.mo", "rb") as stream:
    t = gettext.GNUTranslations(stream)
print(t.pgettext("command", "Open"))
print(t.pgettext("door-state", "Open"))
print(t.gettext("Open"))
print(t.gettext("No owner assigned"))
print(t.gettext("Archive all revisions"))

For this particular catalog the expected results in order are Abrir, Abierta, Open, No owner assigned, and Archive all revisions. The third line asks for the word without a context. It cannot choose one of the two localized answers on your behalf. The fourth line is an untranslated entry. The fifth entry has a Spanish string but retains a fuzzy flag and is skipped in a normal compilation. Seeing the same English text at the end of three lookups does not mean all three have the same cause.

In a real app, start by checking what the source call actually requests. If the developer calls for the context “command,” changing the translation for “door-state” cannot repair a button. If the developer asks for the plain key, neither of those contextual values will be selected. The compiler can successfully package both, and the application can still display English. Describe the lookup that succeeded and the one used on screen when reporting the issue.

The archive message shows why a review flag deserves attention. Replace the singular Spanish instruction with wording that reflects all revisions, read it as an action on a disposable example project, and only then remove the fuzzy flag for this test entry. Recompile, repeat the same lookup and inspect the new result. This makes the review decision visible. Forcing the build to use every fuzzy translation would also expose other tentative suggestions that nobody has assessed.

If a catalog has hundreds of entries, use the existing PO editor’s filters or gettext’s msgattrib utility to enumerate the subset needing human attention. For example, the command below writes just the fuzzy subset to a separate PO file for review. Name the output differently from the main catalog, since the subset is not a replacement for the full file.

msgattrib --only-fuzzy -o fuzzy-review.po messages.po

Send the specific source key, context, old proposed translation and reason for the change with a question. “Does this archive every stored revision, including the current one?” gives the maintainer a clearer decision than a screenshot of an untranslated button. When the answer comes back, edit the entry in the full working catalog, rebuild the MO that will actually be distributed and repeat the relevant lookup. The review-only subset may lack all the unrelated entries that the app still needs.

Distinguish a broken catalog from the wrong catalog

Suppose the lookup test reads “Copiar de ORIGEN-A a DESTINO-B” from your reviewed MO, but a colleague’s development build still displays the previous wording. First confirm that both people are reading the same compiled bytes. A translation package may contain separate MOs for a plug-in and its host application, with similar filenames. Record the filename, relative path, domain and a checksum of the file you tested. Ask the colleague for the checksum of the compiled artifact consumed by the test build. A mismatch at this point is a packaging or selection question.

If the byte values match, compare the exact message key supplied to the application. A changed full stop, curly quotation mark, extra whitespace or revised English verb can distinguish two keys that look nearly identical on a screenshot. The translator can deliberately ask the isolated lookup for the old and new strings, with the same context the app uses. A result that falls back to English only for the new key identifies an entry that needs to be updated in the catalog. It gives the developer a repeatable case without requiring anyone to guess at the user’s Mac settings.

If the isolated lookup returns the expected wording for the exact key and context, ask where the running application loads its translations for this language. Some projects install compiled catalogs into a locale and domain-specific directory during their packaging step; others load explicit resources. Follow the layout for that project. Renaming every PO or editing the system-wide locale will not identify which MO the application selected. Preserve the working example and change one element of the build or language selection at a time.

Finally, consider what happens if the source language is shown to the user. In an unfinished translation, showing a complete original sentence can be an acceptable fallback. Showing half a sentence alongside a translated fragment may instead conceal important conditions. Read the screen with one message intentionally absent in a test build if the maintainer can provide that setup. Record the result for that screen and language only. This lets the release owner decide whether an outstanding entry is suitable for handoff without misrepresenting translation coverage across the entire app.

Read a compiler report against the source entry

When several lines are reported in a production PO, keep a copy of the compiler output beside the editable catalog. Start with the first reported entry and inspect its boundary, comments, key, optional plural and translation. An unclosed quote early in a file can cause a later line to be interpreted in an unexpected context. Correct the earliest confirmed source problem, write the output to a new filename and run the same check again. The number of later messages can change after one syntax repair.

A translation occupying several quoted lines is a single logical message. For example, the first line of the translation might end with a space because the next quoted line continues the sentence. Moving the line break in the editor does not automatically insert a word separator in the runtime string. Read the decoded result or look up the compiled message. If two words run together, inspect the boundary of the quoted pieces instead of inserting an extra space everywhere the words appear in the interface.

Check whether a failing entry has an intentional terminal newline. Messages used in command-line output sometimes end with a newline that separates the next status line. A translation pasted from a scratchpad may look identical in the editor while losing that final escape. Compare both ends of the key and target. After fixing the entry, run the real command against a harmless input if the project supplies one and examine two consecutive status messages. Their boundary is easier to see than a blank at the end of a single output line.

Once the compiler succeeds, note the exact error that was repaired and the behavior that still needed human review. A report that says “fixed the dropped count argument and verified zero, one and two files in Spanish” tells a future reviewer why the change exists. A report that says only “fixed formatting” could refer to punctuation, an argument type, plural selection or a visual layout issue. If the project receives another catalog update, that short description helps the reviewer decide whether to repeat the same small test.

Handle unfinished entries and deliver the checked revision

A fuzzy flag tells a reviewer that an entry needs attention. It can appear after a merge suggests an existing translation for a changed source string. Compare the current key with any previous wording and check the actual instruction. If “Archive one file” becomes “Archive all files,” the old translation might compile and still be materially wrong. Resolve the wording before marking the entry reviewed. An untranslated or fuzzy entry may be absent from a normally compiled catalog, so check the output and the corresponding fallback on the application screen.

When handing off, give the maintainer the reviewed PO, the MO built from it if requested, and a short note identifying the test cases, language and application version. A note such as “tested zero, one and two files, and verified source and destination with distinct labels” is more informative than “translation checked.” If the isolated lookup succeeds but the real screen stays in English, keep the working translations intact and check the domain, locale, file location and project build step with the application owner. That distinction can save a second round of translation work on strings the application never loaded.

References