Update docs for translations
This commit is contained in:
parent
e823c250c0
commit
1c5bfbe796
2 changed files with 19 additions and 6 deletions
17
README.md
17
README.md
|
@ -65,12 +65,14 @@ To develop:
|
||||||
1. Install `npm`.
|
1. Install `npm`.
|
||||||
2. Run `npm install` to install the dependencies
|
2. Run `npm install` to install the dependencies
|
||||||
3. Run `npm run start` to build and host a local testversion
|
3. Run `npm run start` to build and host a local testversion
|
||||||
|
4. By default, the 'bookcases'-theme is loaded. In order to load another theme, use `layout=themename` or `userlayout=true#<layout configuration>`. Note that the custom URLs (e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version. (These are automatically generated from a template on the server).
|
||||||
|
|
||||||
To deploy:
|
To deploy:
|
||||||
|
|
||||||
0. `rm -rf dist/` to remove the local build
|
0. `rm -rf dist/` to remove the local build
|
||||||
1. `npm run build`
|
1. `ts-node createLayouts.ts` to generate the custom htmls, (such as `aed.html`, `bookcases.html`)
|
||||||
2. copy the entire `dist` folder to where you host your website. Visiting `index.html` gives you the website
|
2. `npm run build`
|
||||||
|
3. copy the entire `dist` folder to where you host your website. Visiting `index.html` gives you the website
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
|
@ -112,7 +114,16 @@ TODO: erase cookies of third party websites and API's
|
||||||
|
|
||||||
# Translating MapComplete
|
# Translating MapComplete
|
||||||
|
|
||||||
Help to translate mapcomplete. Fork this project, open [the file containing all translations](https://github.com/pietervdvn/MapComplete/blob/master/UI/i18n/Translations.ts), add your language and send a pull request.
|
Help to translate mapcomplete.
|
||||||
|
|
||||||
|
A theme has translations into the preset.json (`assets/themes/themename/themename.json`). To add a translation:
|
||||||
|
|
||||||
|
1. Modify `"language"` to contain the new language, e.g. `"language":"nl"` becomes `"language": ["nl", "en"]`
|
||||||
|
2. Add extra strings to the texts. If it used to be a single-language theme, one can replace the strings, e.g.: `"description":"Welcome to Open Bookcase Map"` to `"description": {"en":"Welcome to Open Bookcase Map", "nl": "Welkom bij de OpenBoekenruilkastenKaart", "fr": "Bienvenue sûr la carte des petites bibliotheques"}`. If the correct language is not found, it'll fallback to antoher supported language.
|
||||||
|
3. If you notice missing translations in the core of MapComplete, fork this project, open [the file containing all translations](https://github.com/pietervdvn/MapComplete/blob/master/UI/i18n/Translations.ts), add add a language string there
|
||||||
|
4. Send a pull request to update the languages, I'll gladly add it! It doesn't have to be a complete translation from the start ;)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Creating your own theme
|
# Creating your own theme
|
||||||
|
|
||||||
|
|
|
@ -637,7 +637,8 @@ export default class Translations {
|
||||||
ccb: new T({en: 'under the CC-BY-license', nl: 'onder de CC-BY-licentie', fr: 'sous la license CC-BY'}),
|
ccb: new T({en: 'under the CC-BY-license', nl: 'onder de CC-BY-licentie', fr: 'sous la license CC-BY'}),
|
||||||
uploadFailed: new T({
|
uploadFailed: new T({
|
||||||
en: "Could not upload your picture. Do you have internet and are third party API's allowed? Brave browser or UMatrix might block them.",
|
en: "Could not upload your picture. Do you have internet and are third party API's allowed? Brave browser or UMatrix might block them.",
|
||||||
nl: "Afbeelding uploaden mislukt. Heb je internet? Gebruik je Brave of UMatrix? Dan moet je derde partijen toelaten."
|
nl: "Afbeelding uploaden mislukt. Heb je internet? Gebruik je Brave of UMatrix? Dan moet je derde partijen toelaten.",
|
||||||
|
fr: "L'ajout de la photo a échoué. Êtes-vous connecté à Internet?"
|
||||||
}),
|
}),
|
||||||
respectPrivacy: new T({
|
respectPrivacy: new T({
|
||||||
en: "Please respect privacy. Do not photograph people nor license plates",
|
en: "Please respect privacy. Do not photograph people nor license plates",
|
||||||
|
@ -646,11 +647,12 @@ export default class Translations {
|
||||||
}),
|
}),
|
||||||
uploadDone: new T({
|
uploadDone: new T({
|
||||||
en: "<span class='thanks'>Your picture has been added. Thanks for helping out!</span>",
|
en: "<span class='thanks'>Your picture has been added. Thanks for helping out!</span>",
|
||||||
nl: "<span class='thanks'>Je afbeelding is toegevoegd. Bedankt om te helpen!</span>"
|
nl: "<span class='thanks'>Je afbeelding is toegevoegd. Bedankt om te helpen!</span>",
|
||||||
|
fr: "<span class='thanks'>Votre photo est ajouté. Merci beaucoup!</span>"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
centerMessage: {
|
centerMessage: {
|
||||||
loadingData: new T({en: 'Loading data...', nl: 'Data wordt geladen...', fr: 'chargement des données'}),
|
loadingData: new T({en: 'Loading data...', nl: 'Data wordt geladen...', fr: 'Chargement des données'}),
|
||||||
zoomIn: new T({
|
zoomIn: new T({
|
||||||
en: 'Zoom in to view or edit the data',
|
en: 'Zoom in to view or edit the data',
|
||||||
nl: 'Zoom in om de data te zien en te bewerken',
|
nl: 'Zoom in om de data te zien en te bewerken',
|
||||||
|
|
Loading…
Reference in a new issue