{"id":20099070,"url":"https://github.com/spack/localized-docs","last_synced_at":"2026-03-04T21:02:00.250Z","repository":{"id":76702092,"uuid":"187747988","full_name":"spack/localized-docs","owner":"spack","description":"Localized documentation for Spack","archived":false,"fork":false,"pushed_at":"2021-05-26T00:39:04.000Z","size":2022,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-21T00:28:57.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://spack.readthedocs.io","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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-05-21T02:34:29.000Z","updated_at":"2025-01-19T01:52:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"eec67604-192b-47d6-891c-de07df61c670","html_url":"https://github.com/spack/localized-docs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spack/localized-docs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spack%2Flocalized-docs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spack%2Flocalized-docs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spack%2Flocalized-docs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spack%2Flocalized-docs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spack","download_url":"https://codeload.github.com/spack/localized-docs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spack%2Flocalized-docs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30092867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T20:42:30.420Z","status":"ssl_error","status_checked_at":"2026-03-04T20:42:30.057Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-13T17:08:00.010Z","updated_at":"2026-03-04T21:02:00.147Z","avatar_url":"https://github.com/spack.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Localized Documentation for Spack\n\nThis repository contains translations of [Spack](/spack/spack)'s\ndocumentation.  It implements the workflow described in the\n[Sphinx docs](https://www.sphinx-doc.org/en/master/usage/advanced/intl.html).\n\nThe instructions here describe how you can contribute by:\n\n1. Adding to an existing translation, and\n2. Creating a translation in a new language.\n\nPrerequisites\n-------------------------------------\n\n1. First, init the `spack` submodule:\n\n   ```console\n   $ git clone https://github.com/spack/localized-docs\n   $ cd localized-docs\n   $ git submodule init\n   $ git submodule update\n   ```\n\n2. To use this repository you'll need Sphinx, some plugins for it, and\n   `gettext`.  To install these dependencies, using `pip` and `brew`, you\n   can run:\n\n    ```console\n    $ pip3 install -r requirements.txt\n    $ brew install gettext\n    ```\n\n    Using Spack, you can just take advantage of the `spack.yaml` file at\n    the root of this repo:\n\n    ```console\n    spack install\n    spack env activate .\n    ```\n\n    This will install the tools you need and put them in your `PATH`.\n\nAdding to an existing translation\n-------------------------------------\n\nTranslations in this repository are stored in `.po` files under\n`translations`.  There is one translation per languages, and each file is\nnamed according to its\n[ISO-639 language code](https://www.gnu.org/software/gettext/manual/html_node/Language-Codes.html#Language-Codes).\nSo, the Japanese translation data for Spack is stored in\n`translations/ja.po`.\n\nIf you want to add to an existing translation, all you need to do is edit\nthe appropriate `.po` file and add translated strings to it.  `.po` files\nare comprised of `msgid`/`msgstr` pairs.  The `msgid` corresponds to an\nEnglish string in the original documentation, and the `msgstr` is its\ntranslation in the target language.  For example, for Japanese, the\ntranslation of \"Basic Usage\" is stored like this:\n\n```\n#: ../spack/lib/spack/docs/basic_usage.rst:10\nmsgid \"Basic Usage\"\nmsgstr \"基本的な使い方\"\n```\n\nTo add a translation:\n\n1. Update `msgstr` elements in the appropriate `.po` files;\n2. Run `make`;\n3. Commit the results;\n4. Submit a pull request so that we can merge your changes.\n\nThat's all!  Merged pull requests will automatically trigger a rebuild of\nthe translated docs, and you should see your changes at\n[spack.readthedocs.io](https://spack.readthedocs.io/).\n\nIf you want to look at the documentation while you're editing it, running\n`make` also generates per-language builds of the docs in `html/\u003clang\u003e`.\nSo, to see the Japanese documentation, you can run `make` and open\n`html/ja/index.html` in a local web browser.\n\nCreating a new translation\n------------------------------\n\nTo create a new translation, add the language to the `languages` list in\nthe `Makefile`.  For example, if the only language is Japanese (`ja`) and\nyou want to add German (`de`), just add `de`:\n\n```make\nlanguages = ja de\n```\n\nRunning `make`, will create files in `docs`, `locale`, and\n`translations`, and `html`:\n\n```\n    translations/de.po          # German translation file\n    translations/de.mo          # generated from de.po\n    locale/de/LC_MESSAGES/*.mo  # symlinks to translations/de.mo\n    docs/de/                    # a Sphinx build directory for German docs\n    html/de/                    # HTML built by Sphinx from docs/de\n```\n\nAdd everything *except* `html`, then commit. `html` is ignored by default\n(see `.gitignore`), so you can just run this:\n\n```console\n$ git add .\n$ git commit\n```\n\nSee instructions above for how to start translating.\n\nWorkflow\n----------------\n\nThis repository implements the\n[workflow described here](https://www.sphinx-doc.org/en/master/usage/advanced/intl.html).\nMost users will only need to concern themselves with `translations/*.po`\nfiles, but we provide a short summary here so that you can understand how\neverything works.\n\nTranslation is done as follows:\n\n1. First, we use (or rather Sphinx uses) the `gettext` tool to extract\n   strings to be translated from each `.rst` document in the Spack\n   documentation. This results in a set of `.pot` files in\n   `templates/*.pot`.  These contain keys (`msgid`s) for unique strings,\n   as well as their location (file and line number) in the documentation.\n\n2. We merge the `.pot` files into a single `merged.pot` file to eliminate\n   duplicate strings in multiple files.\n\n3. `merged.pot` is used to create an initial `translations/\u003clang\u003e.po`\n   file.  Translations are added to `msgstr` fields in the `.po` file.\n\n4. A single `translations/\u003clang\u003e.mo` file is generated from the `.po`\n   file. The `.mo` file is in a special binary format.\n\n5. We generate symlinks in `locale/\u003clang\u003e/LC_MESSAGES/*.mo` that all\n   point back to the single, unified `translations/\u003clang\u003e.mo` file.  The\n   `locale` directory can then be used with Sphinx to build translated\n   documentation.\n\nThe top-level `Makefile` implements this workflow, so you don't have to\nthink too much about it.\n\n\nLicense\n----------------\n\nThis repository is part of Spack, which distributed under the terms of\nboth the MIT license and the Apache License (Version 2.0). Users may\nchoose either license, at their option.\n\nAll new contributions must be made under both the MIT and Apache-2.0\nlicenses.\n\nSee [LICENSE-MIT](https://github.com/spack/localized-docs/blob/master/LICENSE-MIT),\n[LICENSE-APACHE](https://github.com/spack/localized-docs//blob/master/LICENSE-APACHE),\n[COPYRIGHT](https://github.com/spack/localized-docs/blob/master/COPYRIGHT),\nand [NOTICE](https://github.com/spack/localized-docs/blob/master/NOTICE)\nfor details.\n\nSPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nLLNL-CODE-647188\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspack%2Flocalized-docs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspack%2Flocalized-docs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspack%2Flocalized-docs/lists"}