{"id":20591656,"url":"https://github.com/gdquest/learn-gdscript-translations","last_synced_at":"2025-08-09T08:05:18.569Z","repository":{"id":37011037,"uuid":"463037094","full_name":"GDQuest/learn-gdscript-translations","owner":"GDQuest","description":"Translations for the open-source app Learn GDScript From Zero","archived":false,"fork":false,"pushed_at":"2024-10-24T08:47:46.000Z","size":6216,"stargazers_count":31,"open_issues_count":7,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-25T05:32:40.288Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GDQuest.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":"2022-02-24T06:39:09.000Z","updated_at":"2024-10-24T08:47:50.000Z","dependencies_parsed_at":"2023-02-15T12:16:04.910Z","dependency_job_id":"2faa8d4f-4686-4744-980e-60ed73ed4e29","html_url":"https://github.com/GDQuest/learn-gdscript-translations","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/GDQuest%2Flearn-gdscript-translations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GDQuest%2Flearn-gdscript-translations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GDQuest%2Flearn-gdscript-translations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GDQuest%2Flearn-gdscript-translations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GDQuest","download_url":"https://codeload.github.com/GDQuest/learn-gdscript-translations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975299,"owners_count":21192199,"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":[],"created_at":"2024-11-16T07:41:11.525Z","updated_at":"2025-04-14T22:50:55.709Z","avatar_url":"https://github.com/GDQuest.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Working with translations\n\nYou can contribute translations to the Free app [Learn GDScript From Zero](https://github.com/GDQuest/learn-gdscript/) in this repository. \n\n![](images/app-practice-screen.png)\n\nWe keep translations separate from the app's source code to simplify the contribution process.\n\n\n## How to contribute translations\n\nThe app offers internationalization support using PO (gettext) files. It's a popular format among translation professionals, and it has native support in Godot.\n\n### Contributing using Weblate\n\nYou can contribute translations using the online program Weblate. It's an excellent open-source online app designed for community-driven translations.\n\n![](images/weblate.png)\n\nIf you decide to use the platform, please check the open pull requests (translation contributions on this translation repository) first: https://github.com/GDQuest/learn-gdscript-translations/pulls\n\nWeblate will not detect and synchronize with those pull requests until we integrate them into the repository. If there is an open pull request for your target language, please coordinate with contributors and us to avoid losing work.\n\nIf there is no open pull request for your desired language, you can get started on Weblate right away.\n\nTranslate the app using Weblate today: https://hosted.weblate.org/projects/learn-gdscript-from-zero/\n\nWe warmly thank Weblate for giving us access to their free hosted plan for open source projects.\n\n### Adding translations to PO files\n\nTo contribute translations, open the subdirectory corresponding to your target language. For example, `es/` for Spanish.\n\n_Note: we hired a professional translator to translate the app to Spanish fully, so we currently don't need contributions in Spanish._\n\nThere, you'll find PO translation files. To edit those, you'll need a dedicated program.\n\nThere are several free and open-source translation programs you can use to translate PO files. We recommend [Poedit](https://poedit.net/) as it's available on all three major desktop platforms and it offers an accessible interface.\n\n![](images/poedit.png)\n\nAmong other features, it allows you to mark translations you're unsure of as \"needing work\" so another translator can check it before publishing it.\n\nIf the directory for your language doesn't exist, you'll need to create it. You should create a directory with the two-letter code corresponding to your language. For example, `fr/` for French and `zh/` for Chinese.\n\nThere, you'll need to create PO translation files for your target language from the POT template files. If you need help with that, please ask. We'll be happy to set them up for you.\n\n### Testing your translations in Godot\n\nYou'll want to check your translations in Godot when translating the app. To do so, you need to copy your PO files over to the app's repository: [learn-gdscript](https://github.com/GDQuest/learn-gdscript/).\n\nFirst, you'll want to import the project in Godot.\n\nThen, run the app by pressing \u003ckbd\u003eF5\u003c/kbd\u003e, open the settings menu, and select the target language. The app will remember your choice when you reopen it.\n\nOnce you add many new translations, you can rerun the app to check their length doesn't cause overflowing or other UI issues. As words become longer or shorter in different languages, it's crucial to ensure the interface takes that into account.\n\nIf any bug appears in the interface with new translations, please [open a new issue](https://github.com/GDQuest/learn-gdscript/issues) and include a screenshot so we can fix it.\n\nFinally, please note that if the app is running when you save translations, they may not reload in real-time. In that case, you'll need to close the app by pressing \u003ckbd\u003eF8\u003c/kbd\u003e in Godot and rerun it by pressing \u003ckbd\u003eF5\u003c/kbd\u003e.\n\n## Translation files\n\nWe split translations for each language into many files. It helps translators to focus on a single lesson or aspect of the app at a time:\n\n* `application.*` contains all translatable strings from the UI of the app. Note that this also includes placeholder text which we sometimes add to our reusable components.\n* `classref_database.*` contains entries for the documentation section of the practice side panel, a class reference of sorts that explains some methods and properties to the student. It is based on `course/documentation.csv`.\n* `error_database.*` contains explanations and suggestions for GDScript and internal errors. It is based on `lsp/error_database.csv`.\n* `lesson-*.*` files contain all translatable strings from the course content. Currently, only content blocks, quizzes, and practices are translated. We currently don't support translatable content in scripts and scenes used by lessons.\n\n## How translations work in Godot and the app\n\nThe engine automatically translates UI nodes, while we need to wrap string literals in calls to the `tr()` function.\n\nIn your typical Godot project, you would preload translation resources through the project settings.\n\nInstead, this app loads translations dynamically because we separate localization resources into several files per supported language. This applies to both POT files (translation templates) and translated PO files.\n\n### Updating translation templates\n\nThe gettext translation format comes with two file extensions: POT for translation templates and PO for translations to a specific language.\n\nPO files derive from POT files, which allow us to track strings that changed between releases finely.\n\nTo update POT files, you need to have `babel` and `babel-godot` installed for Python, following [recommendations](https://docs.godotengine.org/en/stable/tutorials/i18n/localization_using_gettext.html#creating-the-po-template-pot-using-pybabel) from the official Godot documentation.\n\nWe use a python script to extract docstrings. You can call it from the root of the project like so:\n\n```\npython ./i18n/extract.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdquest%2Flearn-gdscript-translations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgdquest%2Flearn-gdscript-translations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdquest%2Flearn-gdscript-translations/lists"}