diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8d9647f..007ab730 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,9 +10,22 @@ Of course, you can (and should) improve existing translations. For more details, [see the official docs](https://developer.mozilla.org/Add-ons/WebExtensions/Internationalization#Providing_localized_strings_in__locales). +### Translation style + +The English "you" should be translated in a personal way, if the target language differentiates between "you" for "anybody"/"they" and "you" for "the user of this extension". In German, that e.g. means you can translate it with "du [kannst etwas machen]" instead of "man [kann etwas machen]". + +### Internationalisation of HTML files + +HTML files are easy to internationalize. +You just have to add the custom `data-i18n` and add the [`__MSG_translationName__`](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Internationalization#Predefined_messages) syntax for selecting the value.. If the value is empty, the content of the tag will not be translated. + +If the `data-i18n` value is present, it will additionally try to translate the hardcoded attributes in `localizedAttributes`, and check whether `data-i18n-attribut` (where attribut ios the attribut like `alt` exists) and replace the original attribut in the same way. + +You should always hardcode an English fallback string in the HTML file, so it can use this, if all JS localization fails. + ## Coding guidelines -As for simple indentation issues, please refere to the [editorconfig file](.editoconfig). Just use a [plugin](http://editorconfig.org/#download), if needed, for your editor. +As for simple indentation issues, please refere to the [editorconfig file](.editorconfig). Just use a [plugin](http://editorconfig.org/#download), if needed, for your editor. Apart from that, there are some simple rules. @@ -29,16 +42,3 @@ Apart from that, there are some simple rules. * Use `const` whenever possible (also in local variables in functions), only use `let` when the variable needs to be changed. Don't use `var`. * If you write real constants (i.e. `const` variables not written in functions, if their scope e.g. is a "module" or whole project, and which do represent static _literals_, e.g. simple variable types, such as integers, strings, but not selected HTML elements), do write them in UPPERCASE, otherwise write them as usual variables in camelCase. * Objects, which should never be modified, should be frozen with `Object.freeze`, so they cannot be modified. - -## Translations - -The English "you" should be translated in a personal way, if the target language differentiates between "you" for "anybody"/"they" and "you" for "the user of this extension". In German, that e.g. means you can translate it with "du [kannst etwas machen]" instead of "man [kann etwas machen]". - -### Internationalisation of HTML files - -HTML files are easy to internationalize. -You just have to add the custom `data-i18n` and add the [`__MSG_translationName__`](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Internationalization#Predefined_messages) syntax for selecting the value.. If the value is empty, the content of the tag will not be translated. - -If the `data-i18n` value is present, it will additionally try to translate the hardcoded attributes in `localizedAttributes`, and check whether `data-i18n-attribut` (where attribut ios the attribut like `alt` exists) and replace the original attribut in the same way. - -You should always hardcode an English fallback string in the HTML file, so it can use this, if all JS localization fails. diff --git a/README.md b/README.md index 7e566fc1..98f66dba 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is a (Firefox) Web Extension, which makes it possible to generate a QR code from any website. -In contrast to many other add-ons, which use Google Web APIs for that, this add-on works completely offline. +In contrast to many other add-ons, which use Google Web APIs for that, this add-on works completely offline. **This QR code generator puts your privacy first!** Effectively, the add-on [prevents any web connection](src/manifest.json#L25) for itself, so it does never contact the web. Thanks to the linked `manifest.json` you can also easily verify, that this claim is true. It works offline! Always. It is inspired by [the old Offline QR code generator add-on](https://github.com/catholicon/OfflineQR) for Firefox 56 and lower. This extension only works with Firefox Quantum (Firefox 57) and higher. @@ -30,11 +30,15 @@ See: * Complete internationalization (i18n). * Complete Unicode/UTF-8/Emoji support. * Looks good on desktop and mobile devices, i.e. it is responsive! -* Translated in English and German already. [Add your own language by contributing!](CONTRIBUTING.md#Translations) +* Translated in English and German already. [Contribute your own language!](CONTRIBUTING.md#Translations) * Compatible with Firefox for Android * Settings are synced across devices. * Settings can be managed by your administrator. (work in progress) ## Notes -"QR Code" a registered trademark of DENSO WAVE. +"QR Code" is a registered trademark of DENSO WAVE. + +## Support developoment + +[You can support the development of this add-on on Liberapay](https://liberapay.com/rugk/).