Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize add-on & add features for menu display #17

Merged
merged 35 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9ea02aa
feat: localize options page
rugk Nov 28, 2020
e09ba85
refactor: minor changes recommend by eslint
rugk Nov 28, 2020
c101989
i18n: put menu strings into en.json
rugk Dec 2, 2020
cb6c3ee
refactor: one line per item
rugk Dec 2, 2020
b8307af
refactor: font character
rugk Dec 2, 2020
3aeec08
refactor: make it use the localisation, actually
rugk Feb 28, 2021
e88963e
chore: unify style
rugk Feb 28, 2021
bc236ce
refactor: use prefix to differenciate casing and fonts
rugk Feb 28, 2021
b10ecc5
refactor: use prefix when creating IDs
rugk Feb 28, 2021
a8fedf1
refactor: simplify creation of menu
rugk Feb 28, 2021
5cc97d8
refactor: extract own context menu module
rugk Feb 28, 2021
bb05270
style: rename some stuff
rugk Feb 28, 2021
3953056
refactor: move modules not needed anywhere else to single place
rugk Feb 28, 2021
e574f0c
refactor: rename and remove duplicate code
rugk Feb 28, 2021
4f547bc
translation: add German translations for context menu entries
rugk Feb 28, 2021
dc87791
translation: remove duplicate entry
rugk Feb 28, 2021
d280858
fix(options): fix options loading
rugk Feb 28, 2021
f544202
fix: do not add suberflous separators
rugk Feb 28, 2021
bc68386
feat: allow showing the plain tzext of a transformation
rugk Feb 28, 2021
a2cb769
style: fix order of translation file keys
rugk Feb 28, 2021
f582a72
translations: fix German translation examples and add guides
rugk Feb 28, 2021
6be555e
wrong way getting selection based on permission error
rugk Feb 28, 2021
8f1bbd7
Revert "wrong way getting selection based on permission error"
rugk Feb 28, 2021
3a22aab
feat(): add live preview feature
rugk Feb 28, 2021
8f59b28
feat: do not show menu if no text is selected
rugk Feb 28, 2021
6466b50
feat: add performance limit
rugk Feb 28, 2021
cb5485a
Merge branch 'main' into localisationTry2
rugk Feb 28, 2021
1aa2da2
style: fix style/EsLint errors
rugk Mar 2, 2021
aacb819
Hide incompatible setting with Chrome/ium
rugk Mar 2, 2021
675b4e0
style: eslint fix file
rugk Mar 9, 2021
aed6c40
fix(ContextMenu): refactor context menu definition
rugk Mar 9, 2021
34b79d1
fix: show option in Thunderbird, not only Firefox
rugk Mar 9, 2021
6e04f89
doc: adjust function descriptions
rugk Mar 9, 2021
a48a61c
fix: add seperator
rugk Mar 11, 2021
56a2818
chore: re-add bad icon removal done for testing
rugk Mar 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/manifests/chromemanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

"permissions": [
"storage",
"activeTab",
"<all_urls>",
rugk marked this conversation as resolved.
Show resolved Hide resolved
"tabs",
"contextMenus"
]
Expand Down
2 changes: 1 addition & 1 deletion scripts/manifests/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

"permissions": [
"storage",
"activeTab",
"<all_urls>",
"contextMenus",
"tabs"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/manifests/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

"permissions": [
"storage",
"activeTab",
"<all_urls>",
"contextMenus",
"tabs"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/manifests/thunderbirdmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

"permissions": [
"storage",
"activeTab",
"<all_urls>",
"tabs",
"compose",
"menus"
Expand Down
296 changes: 295 additions & 1 deletion src/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,135 @@
"description": "The message shown, when the options of the settings could not have been reset."
},

// context menu
"menuReadableTextWrapper": {
"message": "$READABLE_TEXT$ – $TRANSFORMED_EXAMPLE$",
"description": "The wrapper that is enabled if you enable the showReadableText option to also show the text without transformation",
"placeholders": {
"readable_text": {
"content": "$1",
"example": "Superscript"
},
"transformed_example": {
"content": "$2",
"example": "ˢᵘᵖᵉʳˢᶜʳⁱᵖᵗ"
}
}
},

"menuCaseLowercase": {
"message": "Kleinbuchstaben",
"description": "An entry in the context menu. This is an entry for the case."
},
"menuCaseUppercase": {
"message": "Großbuchstaben",
"description": "An entry in the context menu. This is an entry for the case."
},
"menuCaseCapitalizeEachWord": {
"message": "Jedes Wort großschreiben",
"description": "An entry in the context menu. This is an entry for the case."
},
"menuCaseToggleCase": {
"message": "Großschreibung umkehren",
"description": "An entry in the context menu. This is an entry for the case."
},

"menuFontSuperscript": {
"message": "Hochgestellt",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSmallCaps": {
"message": "Kleine Kapitälchen",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontAllSmallCaps": {
"message": "Immer kleine Kapitälchen",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontUnicase": {
"message": "Unicase",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSerifBold": {
"message": "Mit Serifen und fett",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSerifItalic": {
"message": "Mit Serfien und kursiv",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSerifBoldItalic": {
"message": "Mit Serfien, fett und kursiv",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSansSerif": {
"message": "serifenlos",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSansSerifBold": {
"message": "serifenlos und fett",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSansSerifItalic": {
"message": "serifenlos und kursiv",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSansSerifBoldItalic": {
"message": "serifenlos, fett und kursiv",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontScript": {
"message": "Skript",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontScriptBold": {
"message": "Skript und fett",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontScriptFraktur": {
"message": "Fraktur",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontFrakturBold": {
"message": "Fraktur und fett",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontMonospace": {
"message": "dickengleich (monospace)",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontDoubleStruck": {
"message": "Doppelt gestrichen",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontCircled": {
"message": "Eingekreist",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontCircledBlack": {
"message": "Eingekreist (schwarz)",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSquared": {
"message": "im Quadrat",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontSquaredBlack": {
"message": "im Quadrat (schwarz)",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},
"menuFontFullwidth": {
"message": "volle Breite",
"description": "An entry in the context menu. This is an entry for the Unicode font."
},

// options
"someSettingsAreManaged": {
"message": "Einige Einstellung werden von deinem Systemadministrator festgelegt und können nicht geändert werden.",
"description": "The message, which appears, when settings are pre-defined (as managed options) by administrators."
},
"optionIsDisabledBecauseManaged": {
"message": "Diese option ist deaktiviert, weil sie von deinem Systemadministrator festgelegt wurde.",
"message": "Diese Option ist deaktiviert, weil sie von deinem Systemadministrator festgelegt wurde.",
"description": "The title (tooltip) shown, when hovering over a disabled, managed option."
},
"optionLearnMore": {
Expand All @@ -61,6 +183,178 @@
"description": "The button to delete all current settings and load the defaults, shown in the add-on settings."
},

"titleUnicodeAutocorrection": {
"message": "Unicode-Autokorrektur",
"description": "A title in the add-on settings."
},
"titleContextMenu": {
"message": "Kontextmenü",
"description": "A title in the add-on settings."
},

"optionHelperTextAutocorrection": {
"message": "Du kannst die automatischen Korrekturen, welche bei Eingabe von Text ausgeführt werden, hier konfigurieren.$BR$Alle Autokorreturen werden ausgeführt, sobald du das ersten nicht-passenden Zeichen, gefolgt von einer Zeichensequenz wie einem Leerzeichen (␣), schreibst. Drück die Rücktaste (⌫) um eine Autokorrektur rückgängig zu machen. Nur das Ersetzen der Anführungszeichen wird sofort ausgeführt.",
"description": "Description for the section titleUnicodeAutocorrection explaining how the autocorrection works.",
"placeholders": {
"br": {
"content": "$1",
"example": "<br>"
}
}
},
"optionHelperTextAutocorrectionEmoji": {
"message": "Um auch Emojis, inklusive $COLON$-Codes und Emoticons, automatisch zu korrigieren zu lassen, teste auch unser $LINK$ add-on.",
"description": "Description for the section titleUnicodeAutocorrection advertising the Awesome Emoji Picker add-on.",
"placeholders": {
"colon": {
"content": "$1",
"example": "<code>:colon:</code>"
},
"link": {
"content": "$2",
"example": "<a href=\"https://addons.mozilla.org/firefox/addon/awesome-emoji-picker/\">🤩&nbsp;Awesome Emoji Picker</a>"
}
}
},
"optionHelperTextAutocorrectionEmojiColonsCode": {
"message": ":Doppelpunkt:",
"description": "This is included in code-style in optionHelperTextAutocorrectionEmoji."
},
"optionHelperTextAutocorrectionEmojiLink": {
"message": "https://addons.mozilla.org/firefox/addon/awesome-emoji-picker/",
"description": "The target for the link provided in optionHelperTextAutocorrectionEmoji. Usually should not be modified and link to the AMO page of the Awesome Emoji Picker. It does redirect to the correct language automatically."
},
"optionHelperTextAutocorrectionEmojiLinkText": {
"message": "🤩\u00a0Awesome Emoji Picker",
"description": "The text for the link provided in optionHelperTextAutocorrectionEmoji. Should be the official name of the emoji picker add-on in your language."
},
"optionHelperTextContextMenu": {
"message": "Schreibe Text, markiere diesen und wähle die passende Option im Kontextmenü aus, um schnell das den Zeichenstil oder die Groß-/Kleinschreibung. Dies ist nützlich bei Websieten, welche es nicht erlauben die Schriftart oder die Textformattierung anzupassen.",
"description": "Description for the section titleContextMenu explaining how the autocorrection works."
},

"optionAutocorrectSymbols": {
"message": "Korrigiere Unicode-Symbole",
"description": "This is an option shown in the add-on settings."
},
"optionAutocorrectSymbolsDescr": {
"message": "Dies ersetzt bspw. $CODE_HYPHEN$ durch –, $CODE_ARROW$ durch ⟶ und $CODE_FRACTION$ mit ¼.",
"description": "This is an option shown in the add-on settings. It describes the optionAutocorrectSymbols setting.",
"placeholders": {
"code_hyphen": {
"content": "$1",
"example": "<code>--</code>"
},
"code_arrow": {
"content": "$2",
"example": "<code>--></code>"
},
"code_fraction": {
"content": "$3",
"example": "<code>1/4</code>"
}
}
},
"optionReplaceQuotes": {
"message": "Ersetze Anführungszeichen mit der typografischen Version",
"description": "This is an option shown in the add-on settings."
},
"optionReplaceQuotesDescr": {
"message": "Dies ersetzt \"diese ('Ersatz-')Anführungszeichen\" mit den sogenannten “smart quotes” bzw. deren “etwas ‘kleinerer’ Variante”.",
"description": "This is an option shown in the add-on settings. It describes the optionReplaceQuotes setting."
},
"optionConvertFractions": {
"message": "Konvertiere Brüche und andere mathematische Konstanten zu Unicode-Zeichen",
"description": "This is an option shown in the add-on settings."
},
"optionConvertFractionsDescr": {
"message": "Dies wird bspw. $CODE_NUMBER$ mit 1234¼ ersetzen.",
"description": "This is an option shown in the add-on settings. It describes the optionConvertFractions setting.",
"placeholders": {
"code_number": {
"content": "$1",
"example": "<code>1234.25</code>"
}
}
},

"optionMenuUnicodeFont": {
"message": "Zeige Uncode-Schriftarten-Optionen",
"description": "This is an option shown in the add-on settings."
},
"optionMenuUnicodeFontDescr": {
"message": "Wie bspw. ᴴᵒᶜʰᵍᵉˢᵗᵉˡˡᵗ, Kʟᴇɪɴᴇ Kᴀᴘɪᴛäʟᴄʜᴇɴ, 𝒮𝓀𝓇𝒾𝓅𝓉, 𝔉𝔯𝔞𝔨𝔱𝔲𝔯 und 🄸🄼 🅀🅄🄰🄳🅁🄰🅃.",
"description": "This is an option shown in the add-on settings. It describes the optionMenuUnicodeFont setting. IMPORTANT: You may choose any (number of) examples here that look good in your language."
},
"optionMenuCasing": {
"message": "Zeige Optionen zur Änderung der Groß-/Kleinschreibung",
"description": "This is an option shown in the add-on settings."
},
"optionMenuCasingDescr": {
"message": "Zum Beispiel, “GROẞSCHREIBUNG”, “kleinschreibung”, “Schriebe Jedes Wort Groß” or “kEHRE gROẞSCHREIBUNG uM”.",
"description": "This is an option shown in the add-on settings. It describes the optionMenuCasing setting."
},

"subtitleEntryPreview": {
"message": "Vorschau",
"description": "The heading/grouping title shown for options customizing the design of the context menu entry."
},
"optionMenuShowReadableText": {
"message": "Zeige eine lesbare Beschreibung der Transformation",
"description": "This is an option shown in the add-on settings."
},
"optionMenuShowReadableTextDescr": {
"message": "Zusätzlich zu den Beispieltransformationen zeigt dies auch den Namen der Transformation als Text an.",
"description": "This is an option shown in the add-on settings. It describes the optionMenuCasing setting."
},
"optionMenuShowLivePreview": {
"message": "Zeige eine Live-Vorschau des ausgewählten Texts",
"description": "This is an option shown in the add-on settings."
},
"optionMenuShowLivePreviewDescr": {
"message": "Zeigt den Effeckt der Transformation anhand des ausgewählten Texts statt eines Beispieltexts.",
"description": "This is an option shown in the add-on settings. It describes the optionMenuCasing setting."
},

// option footer
"translatorCredit": {
"message": "Dieses Add-on wurde von $TRANSLATORS$ ins Deutsche übersetzt.",
"description": "The credit text for the translator. See https://github.com/TinyWebEx/common/blob/master/CONTRIBUTING.md#translator-credit-inside-of-add-on for how to translate this.",
"placeholders": {
"translators": {
"content": "$1",
"example": "<a href=\"https://github.com/rugk/\">@rugk</a>"
}
}
},
"translatorLink": {
"message": "https://github.com/rugk",
"description": "The link to the translator's GitHub profile."
},
"translatorUsername": {
"message": "rugk",
"description": "The username that the translator wants to be referred to."
},

"contributorsThanks": {
"message": "Ebenfalls vielen Dank an $CONTRIBUTORS$.",
"description": "Text thanking all contributors and linking to the contributors file.",
"placeholders": {
"contributors": {
"content": "$1",
"example": "<a href=\"https://github.com/rugk/…/CONTRIBUTORS.md\">all other contributors</a>"
}
}
},
"contributorsThanksLink": {
"message": "https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTORS.md",
"description": "The link to the CONTRIBUTORS file."
},
"contributorsThanksLinkText": {
"message": "alle anderen Beitragenden",
"description": "The link text linking to the contributors file. See contributorsThanks."
},

// ARIA labels/descriptions
"dismissIconDescription": {
"message": "Diese Nachricht schließen",
Expand Down
Loading