{"id":19122416,"url":"https://github.com/rhinstaller/translation-canary","last_synced_at":"2026-07-28T07:05:12.637Z","repository":{"id":45431371,"uuid":"47144314","full_name":"rhinstaller/translation-canary","owner":"rhinstaller","description":"Tests for translated and translatable strings","archived":false,"fork":false,"pushed_at":"2023-07-11T10:29:49.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-22T21:58:07.943Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhinstaller.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2015-11-30T20:33:14.000Z","updated_at":"2021-12-14T12:23:43.000Z","dependencies_parsed_at":"2024-11-09T05:34:10.325Z","dependency_job_id":null,"html_url":"https://github.com/rhinstaller/translation-canary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rhinstaller/translation-canary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhinstaller%2Ftranslation-canary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhinstaller%2Ftranslation-canary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhinstaller%2Ftranslation-canary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhinstaller%2Ftranslation-canary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhinstaller","download_url":"https://codeload.github.com/rhinstaller/translation-canary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhinstaller%2Ftranslation-canary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35980775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-28T02:00:06.341Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T05:21:14.245Z","updated_at":"2026-07-28T07:05:12.620Z","avatar_url":"https://github.com/rhinstaller.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"translation-canary\n-------------\n\nTranslations can crash your program. Creating software for a wide audience\nmeans sending your strings away for translation, and giving up control of your\nstrings means that strings with extralinguistic content can come back broken.\nNo one is likely to even realize it until someone fires up your program in\nHungarian and it crashes because Gtk bombed out on some busted markup, and the\nHungarian speaker is sad, and you are sad, and everything is just the absolute\nworst.\n\nThis is the canary in the translation coalmine.\n\nThere are two parts to this project:\n\ntranslatable:\n  This contains checks on the strings to be submitted for translation. This\n  ensures that the content of the original strings marked for translation are\n  suitable for translation. These tests are run on the POT file before\n  uploading the POT or the updated PO files to the translators.\n\ntranslated:\n  This contains checks on the strings returned from the translators. This\n  ensures that the content of the translated strings won't break anything.\n  These tests are run on the source directory before creating a release.\n\nBoth translatable and translated are run by running the module\n(e.g., `python3 -m translation_canary.translatable`) with the input file(s) as\nthe argument.\n\nIn addition to the python modules, this project contains xgettext_werror.sh, a\nwrapper for xgettext that treats warnings as errors. xgettext will print\nwarnings as it extracts translatable strings from source files, and these\nwarnings should be addressed instead of silently ignored as they scroll by in\nthe build output. To use the script in a package that uses the gettext template\nfiles from autopoint or gettextize, set XGETTEXT=/path/to/xgettext_werror.sh in\nMakevars.\n\n\nUsage as a subtree\n==================\n\nAnaconda and Blivet use translation canary as a git subtree. If you need to\nchange the canary for these projects, follow these steps:\n\n1. Make changes and test them in the context of your project.\n\n2. Copy these changes to the ``translation-canary`` repo and make a pull\n   request with these changes.\n\n3. After that PR is merged, go to Anaconda or Blivet repo root and run::\n\n     dnf install git-subtree\n     git subtree pull --prefix translation-canary/ git@github.com:rhinstaller/translation-canary.git master --squash\n\n   This produces a squash commit with some ancient parent, and then also\n   a merge commit that merges the squash commit into your current ``HEAD``.\n\n4. Make a topic branch and PR for merging what you got into your project. For\n   the purpose of making branches and PRs, the commits above are not special\n   in any way.\n\nNote: There is no way to detect subtree presence, it behaves as regular files\nand directories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhinstaller%2Ftranslation-canary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhinstaller%2Ftranslation-canary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhinstaller%2Ftranslation-canary/lists"}