{"id":19751101,"url":"https://github.com/vulcan-dev/gettext-gen","last_synced_at":"2025-02-28T00:49:09.129Z","repository":{"id":201051398,"uuid":"706819037","full_name":"vulcan-dev/gettext-gen","owner":"vulcan-dev","description":"Automation utility for gettext","archived":false,"fork":false,"pushed_at":"2023-10-18T19:12:22.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T21:32:35.495Z","etag":null,"topics":["c","cpp","languages","localization","python"],"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/vulcan-dev.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}},"created_at":"2023-10-18T17:16:39.000Z","updated_at":"2023-10-18T20:52:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f2fc362-c4a4-4794-840a-53119da092ba","html_url":"https://github.com/vulcan-dev/gettext-gen","commit_stats":null,"previous_names":["vulcan-dev/gettext-gen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcan-dev%2Fgettext-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcan-dev%2Fgettext-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcan-dev%2Fgettext-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vulcan-dev%2Fgettext-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vulcan-dev","download_url":"https://codeload.github.com/vulcan-dev/gettext-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241080794,"owners_count":19906349,"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":["c","cpp","languages","localization","python"],"created_at":"2024-11-12T02:42:19.227Z","updated_at":"2025-02-28T00:49:08.875Z","avatar_url":"https://github.com/vulcan-dev.png","language":"Python","readme":"# gettext-gen\n\n## Usage:\n```\ngen_localization.py [-h] [-t]\n  -h, --help       show this help message and exit\n  -t, --translate  Whether or not to auto-translate missing fields\n  -c, --config     Creates default .env\n```\n\nWhen you download this, rename `.env.example` to `.env` and then modify it to your choosing.  \nMost options can be modified in the `.env` file, but in order to change the files `xgettext` scans, you will need to modify the `files` list in the python file.\n\n## Requirements\nYou will need to have the following in your path:  \n- xgettext\n- msgfmt\n- msginit\n- msgmerge  \n\nYou can get these for both Linux and Windows.  \nOn Linux, use your package manager.  \nOn Windows, you can get it from quite a few places, here's one: https://gnuwin32.sourceforge.net/packages/gettext.htm\n\n## Automatic Translation\nAdd the following to your `.env` file:\n```\nDEEPL_KEY=YOUR_KEY_HERE\n```\nOnce done, you can run the script with `-t` or `--translate`.  \nNote: It will only translate fields that haven't already been translated. If you would like to have it translate again, clear the `msgstr` so it looks like: `msgstr \"\"`\n\n## Manual Translation\nTo manually translate, just edit the `.po` files and then run the script again. It will build it and move the built files to their correct locations.\n\n---\n\n## Notices\nIt throws warnings if you do something like:\n```cpp\ngettext(\"Hello World!\\n\");\n```\nDon't add newlines like this for now, even though I think it still works.  \nI recommend doing the following:\n```cpp\n#define STR_MYTEXT _(\"My Text\")\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvulcan-dev%2Fgettext-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvulcan-dev%2Fgettext-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvulcan-dev%2Fgettext-gen/lists"}