{"id":18904368,"url":"https://github.com/relikd/stringslator","last_synced_at":"2026-05-07T07:39:32.147Z","repository":{"id":144637371,"uuid":"174717784","full_name":"relikd/stringslator","owner":"relikd","description":"Search system strings for localizations / translations for NSLocalizedString(), etc.","archived":false,"fork":false,"pushed_at":"2022-03-15T14:48:19.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T10:28:16.639Z","etag":null,"topics":["i18n","internationalization","localization","macos","nslocalizedstring","translation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/relikd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-09T16:25:36.000Z","updated_at":"2022-03-15T14:48:58.000Z","dependencies_parsed_at":"2024-03-27T20:32:59.402Z","dependency_job_id":null,"html_url":"https://github.com/relikd/stringslator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fstringslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fstringslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fstringslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/relikd%2Fstringslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/relikd","download_url":"https://codeload.github.com/relikd/stringslator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239889029,"owners_count":19713702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["i18n","internationalization","localization","macos","nslocalizedstring","translation"],"created_at":"2024-11-08T09:08:11.622Z","updated_at":"2026-03-04T12:30:22.724Z","avatar_url":"https://github.com/relikd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stringslator\n\nSimple system strings localization for the masses. NSLocalizedString()\n\n\n\n## What is it?\n\nThis script was inspired by an App called [System Strings][1] by Oleg Andreev. The functionality is similar but doesn't rely on a dictionary that is distributed together with the application.\n\nInstead this script will parse all translation files (`.strings`\nfiles) that are already present in the operating system. Common translations like 'Abort' were already translated by Apple Inc. (and other software distributors).\n\n\n\n## Usage\n\nFirst we have to create an index on some files. Lets start with macOS' system applications.\n\n```\nstringslator.py add -r /System/\n```\n\nThis takes roughly 1 minute. The SQLite database is now initialized (133mb with 1.7M strings) in the same directory as the python script. We can start searching for some translations:\n\n```\nstringslator.py search \"Update s%\"\n```\n```\n  141 | Update Security Code  ---  ('UPDATECODE')\n  320 | Update Services  ---  ('kPerformSDPQueryKey')\n  454 | Update suchen  ---  ('SOFTWARE_UPDATE_FINDING')\n  454 | Update suchen  ---  ('MIGRATION_UPDATE_FINDING')\n 1747 | Update Services  ---  ('kPerformSDPQueryKey')\n\n5 results.\n```\n\nNotice here, we used `%` to match an arbitrary suffix. Use `_` for a single character wildcard. SQLite like matching rules apply. (see Notes below for language specific search). This view can get quite loaded, you can pipe the result into `less -S`.\n\nAfter we found a translation we want, lets export the translations for all available languages. For that, we use the first column id and the title-key value inside `('...')`.\n\n```\nstringslator.py export 141 \"UPDATECODE\"\n```\n```\nar|تحديث رمز الأمن\nca|Actualitzar codi de seguretat\ncs|Aktualizovat zabezpečovací kód\nda|Opdater sikkerhedskode\nde|Sicherheitscode aktualisieren\nel|Ενημέρωση κωδικού ασφαλείας\nen|Update Security Code\nes|Actualizar código de seguridad\nes_419|Actualizar código de seguridad\nfi|Päivitä suojakoodi\nfr|Mettre à jour le code de sécurité\nhe|עדכן/י קוד אבטחה\nhi|सुरक्षा कोड अपडेट करें\nhr|Ažuriraj sigurnosni kôd\nhu|Biztonsági kód frissítése\nid|Perbarui Kode Keamanan\nit|Aggiorna codice di sicurezza\nja|セキュリティコードをアップデート\nko|보안 코드 업데이트\nms|Kemas Kini Kod Keselamatan\nnl|Werk beveiligingscode bij\nno|Oppdater sikkerhetskode\npl|Uaktualnij kod bezpieczeństwa\npt|Atualizar Código de Segurança\npt_PT|Atualizar código de segurança\nro|Actualizează codul de securitate\nru|Обновить код безопасности\nsk|Aktualizovať bezpečnostný kód\nsv|Uppdatera säkerhetskod\nth|อัพเดทรหัสความปลอดภัย\ntr|Güvenlik Kodunu Güncelle\nuk|Оновити захисний код\nvi|Cập nhật Mã Bảo mật\nzh_CN|更新安全码\nzh_TW|更新安全碼\n```\n\nFor a quick translation job this should be sufficient. If you need some advanced processing, you can also use the SQLite db directly.\n\nIf you later decide to add or remove additional applications to the db, use the `add` and `delete` commands respectively. Apps can also be deleted by their file-id. All commands show a help `-h` window to describe available options.\n\n\n\n## Notes\n\nSearch will always search case independent and by default English and German translations. If you want to change this behavior go to `cli_search` and modify `langs=[\"en%\", \"de%\", \"Ger%\"]`.\n\n\n[1]: https://itunes.apple.com/us/app/system-strings/id570467776?l=en","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelikd%2Fstringslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelikd%2Fstringslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelikd%2Fstringslator/lists"}