andi34 / photobooth

A Photobooth web interface for Linux and Windows.
MIT License
71 stars 39 forks source link

Fallback to English if a translation is missing #41

Closed andi34 closed 4 years ago

andi34 commented 4 years ago

Is your feature request related to a problem? Please describe. At the moment a it'll show the key if a translation is missing. We should fallback to the English language file on those missing keys.

Initial issue (feature request) opened here: https://github.com/andreknieriem/photobooth/issues/125

Describe the solution you'd like Allow to define a fallback language

Describe alternatives you've considered Remove languages which are not fully translated.

Additional context https://github.com/andi34/photobooth/tree/fallback-language

Using json files for translations allows an easy use of i18n-editor to make it easier for people to translate our project.

Get i18n-editor v2.0.0-beta.1 from here. The application requires java 8 to be installed on your system. You can get java 8 from https://www.oracle.com/java/technologies/javase-jre8-downloads.html .

andi34 commented 4 years ago

Get i18n-editor v2.0.0-beta.1 from here. The application requires java 8 to be installed on your system. You can get java 8 from https://www.oracle.com/java/technologies/javase-jre8-downloads.html .

If you are running i18n-editor the first time, you simply need to drag-and-drop the lang folder (inside your photobooth source at resources/lang) into i18n-editor:

Screenshot_2020-04-06_11-42-03

You could also click on File -> New Project -> JSON Format ... -> navigate into the lang folder -> click on open Now you get asked if you like to import found existing translations -> confirm clicking on yes

Screenshot_2020-04-06_11-39-22

Make your translations, press CTRL + S to save your changes (or click on File -> Save),

Screenshot_2020-04-06_11-41-03