Move to Hosted Weblate (#62)
This commit is contained in:
commit
f122ebb8b1
4 changed files with 55 additions and 8 deletions
|
@ -279,5 +279,4 @@ Initial release of the site
|
|||
[1.1.2]: https://github.com/kytta/share2fedi/compare/v1.1.1...v1.1.2
|
||||
[1.1.1]: https://github.com/kytta/share2fedi/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://github.com/kytta/share2fedi/compare/v1.0.0...v1.1.0
|
||||
[1.0.0]:
|
||||
https://github.com/kytta/share2fedi/compare/e85aa15400bcdbcccf655d331f72df8304744b85...v1.0.0
|
||||
[1.0.0]: https://github.com/kytta/share2fedi/compare/e85aa15400bcdbcccf655d331f72df8304744b85...v1.0.0
|
||||
|
|
|
@ -87,15 +87,36 @@ form of JSON-based dictionaries.
|
|||
|
||||
There are two ways you can add/edit translations:
|
||||
|
||||
1. The JSON files under `src/i18n/translations` represent dictionaried for
|
||||
1. [Weblate](https://hosted.weblate.org/engage/share2fedi/), a web-based tool
|
||||
that simplifies this process.
|
||||
- we use Hosted Weblate. You can login using any account. Make sure to set
|
||||
the correct email so that the changes can be attributed to you!
|
||||
- Weblate handles PRs automatically. You do not need to do anything other
|
||||
than use it to edit translations
|
||||
2. The JSON files under `src/i18n/translations` represent dictionaried for
|
||||
different languages. The two-letter codes correspond to the ISO 639-1
|
||||
language codes.
|
||||
- to edit translations, just edit the files. Refer to
|
||||
[the coding guide](#improving-code) for more information on how to do this.
|
||||
2. [Weblate](https://translate.codeberg.org/engage/share2fedi/), a web-based
|
||||
tool that simplifies this process.
|
||||
- we use Codeberg's Weblate instance, which requires a Codeberg account. If
|
||||
you have one, this is the easiest way to edit translations.
|
||||
|
||||
### Adding new languages
|
||||
|
||||
You may notice that adding a new language in Weblate or in the code does not add
|
||||
it to the language dropdown. This is due to the i18n needing to define the
|
||||
languages for the dropdown.
|
||||
|
||||
To add a new language, edit the `src/i18n/translations.ts` file. Import the JSON
|
||||
file with the translations and add a new entry to the `languages` mapping.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> For the language name, use a **capitalized autonym**. An autonym
|
||||
> is the name of the language in the language itself. You can consult CLDR or
|
||||
> Wikipedia for this. It should be capitalized, if it makes sense in the
|
||||
> language. It should NOT include the word "language" unless it's common to use
|
||||
> it ("Bahasa Indonesia", but "Русский", not "русский язык")
|
||||
>
|
||||
> A good rule of thumb is to take the value that Wikipedia uses in their
|
||||
> [language list](https://www.wikipedia.org/#js-lang-lists).
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
|
|
28
README.md
28
README.md
|
@ -138,6 +138,34 @@ If you _really_ have to use Docker, there is
|
|||
**I will not** provide support for Docker-based deployments in the observable
|
||||
future.
|
||||
|
||||
## Contribute
|
||||
|
||||
### Source code
|
||||
|
||||
TL;DR: `pnpm install && pnpm dev`
|
||||
|
||||
See [contributing guide](CONTRIBUTING.md#improving-code) for instructions on how
|
||||
to contribute source code to the project, including adding new Fediverse
|
||||
projects.
|
||||
|
||||
### Translations
|
||||
|
||||
Share₂Fedi uses Hosted Weblate for translations.
|
||||
[You can edit translations using it's practical interface.](https://hosted.weblate.org/engage/share2fedi/).
|
||||
You also could do it manually by editing files in `src/i18n/translations`, but
|
||||
this is NOT recommended.
|
||||
|
||||
<a href="https://hosted.weblate.org/engage/share2fedi/">
|
||||
<img src="https://hosted.weblate.org/widget/share2fedi/site/multi-auto.svg" alt="Translation status" />
|
||||
</a>
|
||||
|
||||
> [!NOTE]
|
||||
> New languages do not become automatically available. For this, a
|
||||
> separate change to our ad-hoc i18n engine has to be made. See
|
||||
> [contributing guide](CONTRIBUTING.md#translating) for instructions
|
||||
|
||||
_We thank Weblate for providing Libre hosting!_
|
||||
|
||||
## See also
|
||||
|
||||
**[📯 Shareon](https://shareon.js.org)** (lightweight, stylish, and ethical
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
"assets/*.{png,svg}": "pnpm run build:icons"
|
||||
},
|
||||
"prettier": {
|
||||
"proseWrap": "always",
|
||||
"singleAttributePerLine": true
|
||||
},
|
||||
"stylelint": {
|
||||
|
|
Reference in a new issue