1
0
Fork 0
mirror of https://github.com/Findus23/typo3-keyboard.git synced 2024-08-27 19:52:16 +02:00

add English translation

This commit is contained in:
Lukas Winkler 2018-09-20 10:09:15 +02:00
parent 0baa98291f
commit 326d8561ff
5 changed files with 140 additions and 15 deletions

58
_locales/de/messages.json Normal file
View file

@ -0,0 +1,58 @@
{
"extension_description": {
"message": "Produktives Arbeiten in TYPO3 mithilfe von Keyboard Shortcuts",
"description": "description of the extension"
},
"close_label": {
"message": "Schließen",
"description": ""
},
"save_label": {
"message": "Speichern",
"description": ""
},
"saveAndClose_label": {
"message": "Speichern und Schließen",
"description": ""
},
"saveAndViewPage_label": {
"message": "Speichern und Seite anzeigen",
"description": ""
},
"saveAndCreateNewOne_label": {
"message": "Speichern und neues erstellen",
"description": ""
},
"delete_label": {
"message": "Löschen",
"description": ""
},
"edit_label": {
"message": "Seite bearbeiten",
"description": ""
},
"viewPage_label": {
"message": "Seite anzeigen",
"description": ""
},
"flushFrontendCaches_label": {
"message": "Frontend Cache leeren",
"description": ""
},
"flushAllCaches_label": {
"message": "Backend Cache leeren",
"description": ""
},
"searchField_label": {
"message": "Suche fokusieren",
"description": ""
},
"save_button": {
"message": "Speichern",
"description": ""
},
"saved": {
"message": "✓ gespeichert",
"description": ""
}
}

58
_locales/en/messages.json Normal file
View file

@ -0,0 +1,58 @@
{
"extension_description": {
"message": "use TYPO3 productively by using keyboard shortcuts",
"description": "description of the extension"
},
"close_label": {
"message": "Close",
"description": ""
},
"save_label": {
"message": "Save",
"description": ""
},
"saveAndClose_label": {
"message": "Save and Close",
"description": ""
},
"saveAndViewPage_label": {
"message": "Save and View",
"description": ""
},
"saveAndCreateNewOne_label": {
"message": "Save and create new",
"description": ""
},
"delete_label": {
"message": "Delete",
"description": ""
},
"edit_label": {
"message": "Edit page properties",
"description": ""
},
"viewPage_label": {
"message": "View webpage",
"description": ""
},
"flushFrontendCaches_label": {
"message": "Flush frontend caches",
"description": ""
},
"flushAllCaches_label": {
"message": "Flush all caches",
"description": ""
},
"searchField_label": {
"message": "focus seach",
"description": ""
},
"save_button": {
"message": "Save",
"description": ""
},
"saved": {
"message": "✓ saved",
"description": ""
}
}

View file

@ -2,8 +2,8 @@
"manifest_version": 2,
"name": "TYPO3 Keyboard Control",
"short_name": "TYPO3 Keyboard Control",
"version": "1.0.2",
"description": "Produktives Arbeiten in TYPO3 mithilfe von Keyboard Shortcuts",
"version": "1.0.3",
"description": "__MSG_extension_description__",
"permissions": [
"storage"
],
@ -27,6 +27,7 @@
]
}
],
"default_locale": "en",
"applications": {
"gecko": {
"id": "{9a7acde7-4af3-47d9-8061-c60811b351f2}",

View file

@ -18,51 +18,51 @@ margin-bottom: 10px;
<form>
<h1>Keyboard Shortcuts</h1>
<div>
<label for="close">Schließen</label>
<label for="close" id="close-label"></label>
<input id="close" type="text">
</div>
<div>
<label for="save">Speichern</label>
<label for="save" id="save-label"></label>
<input id="save" type="text">
</div>
<div>
<label for="saveAndClose">Speichern und Schließen</label>
<label for="saveAndClose" id="saveAndClose-label"></label>
<input id="saveAndClose" type="text">
</div>
<div>
<label for="saveAndViewPage">Speichern und Seite anzeigen</label>
<label for="saveAndViewPage" id="saveAndViewPage-label"></label>
<input id="saveAndViewPage" type="text">
</div>
<div>
<label for="saveAndCreateNewOne">Speichern und neues erstellen</label>
<label for="saveAndCreateNewOne" id="saveAndCreateNewOne-label"></label>
<input id="saveAndCreateNewOne" type="text">
</div>
<div>
<label for="delete">Löschen</label>
<label for="delete" id="delete-label"></label>
<input id="delete" type="text">
</div>
<div>
<label for="edit">Seite bearbeiten</label>
<label for="edit" id="edit-label"></label>
<input id="edit" type="text">
</div>
<div>
<label for="viewPage">Seite anzeigen</label>
<label for="viewPage" id="viewPage-label"></label>
<input id="viewPage" type="text">
</div>
<div>
<label for="flushFrontendCaches">Frontend Cache leeren</label>
<label for="flushFrontendCaches" id="flushFrontendCaches-label"></label>
<input id="flushFrontendCaches" type="text">
</div>
<div>
<label for="flushAllCaches">Backend Cache leeren</label>
<label for="flushAllCaches" id="flushAllCaches-label"></label>
<input id="flushAllCaches" type="text">
</div>
<div>
<label for="searchField">Suche fokusieren</label>
<label for="searchField" id="searchField-label"></label>
<input id="searchField" type="text">
</div>
<button type="submit">Speichern</button>
<div style="visibility:hidden" id="saved">✓ gespeichert</div>
<button type="submit" id="save-button"></button>
<div style="visibility:hidden" id="saved"></div>
</form>

View file

@ -35,5 +35,13 @@ function restoreOptions() {
});
}
const translatableIDs = ["close-label", "save-label", "saveAndClose-label", "saveAndViewPage-label", "saveAndCreateNewOne-label", "delete-label", "edit-label", "viewPage-label", "flushFrontendCaches-label", "flushAllCaches-label", "searchField-label", "save-button", "saved"];
translatableIDs.forEach(function (id) {
const translateKey = id.replace(/-/g, "_");
console.info(translateKey);
console.log(document.getElementById(translateKey));
document.getElementById(id).innerText = chrome.i18n.getMessage(translateKey);
});
document.addEventListener('DOMContentLoaded', restoreOptions);
document.querySelector('form').addEventListener('submit', saveOptions);