Skip to content

← All tools

Free tool for iOS and Mac developers

Xcode String Catalog translation progress

Drop your Localizable.xcstrings and see, for every language, how many strings are translated, need review, are new, stale or missing, and the percentage done. Below it you get the list of keys still to translate, filterable by language, state and text, the keys marked "Don't translate", and a CSV of what is left to send to a translator. It runs in this page; nothing is uploaded.

Your String Catalog

Drop a Localizable.xcstrings (or any .xcstrings) file here, open it, or paste its contents. It is read in this page and never uploaded.

Drop, open or paste a String Catalog to see its progress.

How it works

  • •The page reads the catalog's JSON as Xcode writes it: sourceLanguage, strings, and for each key its localizations with a stringUnit (state and value), variations by plural or device, and substitutions.
  • •Each key counts once per language. When a key varies by plural or device, or has substitutions, every case is read and the key takes its least finished state: one plural case marked needs_review makes the whole key "needs review".
  • •States are counted exactly as written in the file: translated, needs_review and new. A state the page does not know is shown under its own name instead of being guessed. A language with no entry for a key counts that key as missing.
  • •In the source language a key with no entry uses the key itself as its text, so it counts as translated.
  • •Keys whose extractionState is "stale" (Xcode no longer finds them in code) are counted in their own column and left out of the percentage. Keys with shouldTranslate set to false are listed apart and not counted.
  • •The CSV has one row per untranslated key and language, with the source text and the developer comment, so a translator has the context.

What it does not do

  • •It does not check whether a language has every plural form its grammar needs (Russian needs one, few, many and other, for example). It counts the cases that are in the file.
  • •Xcode's own percentages in the catalog editor may be worked out differently. Use this page as a to-do list, not as a copy of Xcode's numbers.
  • •It does not translate anything and does not write the catalog back. Enter translations in Xcode, or use Product > Export Localizations for a translator.
  • •It reads .xcstrings files only, not older .strings or .stringsdict files or exported .xliff files.
  • •It does not check that format specifiers such as %@ or %lld match between languages.

Questions

What does "needs review" mean in a String Catalog?
The translation exists but someone should look at it again. Xcode sets this state when the source text of a key changes after it was translated, and you can also mark a string for review yourself. It is stored as state "needs_review" in the file.
What is a stale string?
A key that Xcode no longer finds in your code when it syncs the catalog during a build. It is marked with extractionState "stale" and keeps its translations, in case the code comes back. When we ran Xcode's xcstringstool sync on a test catalog, keys that had translations were marked stale and keys without any were removed. Delete stale keys you no longer need.
Why does a plural string count as one key?
Because it is one string in your app. Its plural cases (one, other and so on) or device cases (iPhone, Mac and so on) are checked one by one, and the key counts as translated only when every case is. If one case is new or needs review, the key shows that state.
What does "Don't translate" do?
Marking a string "Don't translate" in Xcode writes shouldTranslate: false. The app then shows the source text in every language. This page lists those keys separately and leaves them out of the counts, so brand names and symbols do not drag your percentage down.
Is my catalog uploaded anywhere?
No. The file is read by JavaScript in this page and never sent to a server. You can disconnect from the internet after the page has loaded and it still works.
How do I give the missing strings to a translator?
Download the CSV for one language or all of them. Each row has the key, its state, the source text and your comment. For a round trip straight back into Xcode, Product > Export Localizations makes an .xcloc package a translator can fill in and you can import again.

Related