Skip to content

i18n repository files

Hans5958 edited this page Aug 27, 2023 · 9 revisions

This page documents the explanation for the files on the i18n repository.

Directory tree

. 
└── 📂 [language code]            # (eg. en for English)
    ├── 📂 html-content           # HTML, content
    ├── 📂 markdown               # Markdown
    ├── 📂 static-html-content    # HTML, content (static)*
    ├── 📂 static-markdown        # Markdown (static)*
    ├── 📜 addons-data.json       # Addons data*
    ├── 📜 contributor-types.yml  # Contributor types
    ├── 📜 html-front.yml         # HTML, front matter
    ├── 📜 hugo-i18n.yml          # Hugo i18n strings
    ├── 📜 changelog.yml          # Changelog
    └── 📜 static-front.yml       # Front matter (static)*

* These are not uploaded to Transifex and only appear on the English folder (en).

Files explanation

Hugo i18n strings (hugo-i18n)

This resource includes all strings that is used directly by Hugo. Usually directed for the layouts.

This resource has hugo-i18n as the slug on Transifex, and the corresponding file is hugo-i18n.yml.

HTML, content (html-content)

This folder includes resources for the content part of the HTML files (the bottom part). The front matter part (the top part) is included on the "HTML, front matter" resource.

This resource has html-content_file_path as the slug pattern on Transifex, and the corresponding file path pattern is html-content/file/path.md. (For example, html-content_welcome is html-content/welcome.html in the repository.)

HTML, content (static) (static-html-content)

This folder includes files for the content part of the HTML files that don't need translating. This collection of types usually only have the front matter part translated.

The corresponding file path pattern is the static-html-content/file/path.html.

HTML, front matter (html-front)

This resource includes the front matter of the HTML files (the top part). The front matter includes the title and the description of an HTML file.

This resource has html-front as the slug on Transifex, and the corresponding file is html-front.yml.

Markdown (markdown)

This folder includes resources for the Markdown files. The front matter can be translated within the same resource.

This resource has markdown_file_path as the slug pattern on Transifex, and the corresponding file path pattern is markdown/file/path.md. (For example, markdown_docs__index is markdown/docs/_index.md in the repository.)

Front matter (static) (static-front)

This file includes the front matter of the HTML and Markdown files that don't need to be translated.

The corresponding file is the static-front.yml.

Addons data (addons-data)

This file includes the addons data based on the current version of Scratch Addons. This data is generated by a script.

The corresponding file is the addons-data.json.

Contributor types (contributor-types)

This file includes the contributor types for contributors on the credits page. There are certain differences between here and the all-contributor type spec, usually for additional types and capitalization.

The corresponding file is the contributor-types.yml.

Changelog (changelog)

This file includes the translations of the changelog. Currently, only select strings are allowed to be translated (including, but not limited to, the highlights).

Note that due to the similarity of the strings, you may copy what is translated on the extension. This doesn't mean the translations have to be same and can't be changed in the future; that is allowed. Use https://scratchaddons.github.io/notification-to-highlights/ if you want to see past translations of the notification.

The corresponding file is the changelog.yml.