diff --git a/CHANGELOG.md b/CHANGELOG.md index f0d2ed6..4b59969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad2470c..cba7c50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/README.md b/README.md index f2201d4..e7d1476 100644 --- a/README.md +++ b/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. + + +Translation status + + +> [!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 diff --git a/package.json b/package.json index ca8a79c..0791c4e 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "assets/*.{png,svg}": "pnpm run build:icons" }, "prettier": { - "proseWrap": "always", "singleAttributePerLine": true }, "stylelint": {