{"id":15720709,"url":"https://github.com/jadsongmatos/gnome-rust-base","last_synced_at":"2026-04-28T20:05:10.840Z","repository":{"id":216229991,"uuid":"740758218","full_name":"jadsongmatos/gnome-rust-base","owner":"jadsongmatos","description":"A comprehensive guide for starting projects with GTK, Rust, Meson, and Flatpak in the GNOME environment, with a focus on implementing multiple language support.","archived":false,"fork":false,"pushed_at":"2024-01-09T23:47:49.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T04:41:00.163Z","etag":null,"topics":["desktop","gnome","gtk","gui","hello-world","libadwaita","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jadsongmatos.png","metadata":{"files":{"readme":"README.md","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":"2024-01-09T02:12:07.000Z","updated_at":"2024-03-19T13:58:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"3caccd02-4ab2-4262-86ee-d24137ca2786","html_url":"https://github.com/jadsongmatos/gnome-rust-base","commit_stats":null,"previous_names":["jadsongmatos/gnome-rust-base"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadsongmatos%2Fgnome-rust-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadsongmatos%2Fgnome-rust-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadsongmatos%2Fgnome-rust-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadsongmatos%2Fgnome-rust-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jadsongmatos","download_url":"https://codeload.github.com/jadsongmatos/gnome-rust-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390856,"owners_count":20769476,"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":["desktop","gnome","gtk","gui","hello-world","libadwaita","rust"],"created_at":"2024-10-03T21:59:55.947Z","updated_at":"2026-04-28T20:05:05.792Z","avatar_url":"https://github.com/jadsongmatos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gnome-rust-base\n\nA comprehensive guide for starting projects with GTK, Rust, Meson, and Flatpak in the GNOME environment, with a focus on implementing multiple language support.\n\n## Building Methods\n\n### Using Flatpak and GNOME Builder\n\ngnome-rust-base can be easily compiled and run using [GNOME Builder](https://wiki.gnome.org/Apps/Builder).\n\n### Using flatpak-builder\n\n1. `flatpak-builder --user flatpak_app build-aux/org.gnome.Example.json`\n2. `flatpak-builder --env=LC_ALL=pt_BR.UTF8 --run flatpak_app build-aux/org.gnome.Example.json gnome-rust-base`\n\n### Manual Method\n\n1. `meson --prefix=/usr build-dir`\n2. `ninja -C build-dir`\n3. `ninja -C build-dir install`\n4. `gnome-rust-base`\n\nFor detailed information about dependencies, see the [Flatpak manifest](org.gnome.Example.json).\n\n## Implementing Multiple Language Support in GNOME Builder (Rust)\n\n### Initial Setup\n\n1. **Creating the `.pot` File:**\n    - Build the project with Meson: `meson --prefix=/usr build-dir`\n    - Generate the `.pot` file: `ninja -C build/ gnome-rust-base-pot`\n    - The file will be created at `po/gnome-rust-base.pot`.\n\n### Preparing the UI for Translation\n\n1. **UI File Changes:**\n    - In `src/window.ui`, mark properties for translation with `translatable=yes`.\n      - Example: `\u003cproperty name=\"label\" translatable=\"yes\"\u003eHello, World!\u003c/property\u003e`\n    - Update the `.pot` file.\n\n2. **Troubleshooting:**\n    - Ensure all commands were executed correctly and that changes to the UI file are correct.\n\n3. **Regenerate the `.pot` File:**\n    - Command: `ninja -C build gnome-rust-base-pot`.\n\n### Translation Process\n\n1. **Creating Language Files:**\n    - Use `msginit` to generate a translation file for the desired language.\n      - Example: `msginit -l pt_BR --no-translator -i po/gnome-rust-base.pot -o po/pt_BR.po`\n    - Translate the `po/pt_BR.po` file using a text editor or specialized tool like gtranslator or poedit.\n\n2. **Updating the `LINGUAS` File:**\n    - Add the new language code (e.g., `pt_BR`) to the `po/LINGUAS` file in alphabetical order.\n    - This step is crucial for the compilation and installation process.\n\n### Conclusion and Testing\n\n- **Changing the Application Language:**\n  - The application's language will match the system's `LANG` variable.\n  - To test in a specific language, set the `LC_ALL` variable, e.g., `LC_ALL=pt_BR.UTF8 gnome-rust-base`.\n\n---\n\nSpecial thanks to [Rafael Fontenelle](https://github.com/rffontenelle) for assisting in understanding how to implement multiple languages in GNOME.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadsongmatos%2Fgnome-rust-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadsongmatos%2Fgnome-rust-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadsongmatos%2Fgnome-rust-base/lists"}