Skip to content

Commit

Permalink
#47 Breakthrough in localization
Browse files Browse the repository at this point in the history
  • Loading branch information
bwl21 committed Aug 10, 2016
1 parent 214c477 commit b932274
Show file tree
Hide file tree
Showing 6 changed files with 377 additions and 57 deletions.
95 changes: 49 additions & 46 deletions 30_sources/SRC_Zupfnoter/index_opal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<link rel="stylesheet" type="text/css" href="vendor/w2ui/dist/w2ui.min.css"/>
<link rel="stylesheet" type="text/css" href="vendor/font-awesome/css/font-awesome.min.css"/>
<script type="text/javascript" src="vendor/w2ui/dist/w2ui.min.js"></script>
<script type="text/javascript" src="vendor/w2ui/dist/w2ui.js"></script>

<style>
.spinner {
Expand All @@ -57,6 +57,8 @@

function init_w2ui(uicontroller) {

debugger;

perspectives = {
'tb_perspective:Alle': function () {
w2ui['layout'].show('left', window.instant);
Expand Down Expand Up @@ -136,26 +138,27 @@
'tb_create': function () {
openPopup({
name: 'createNewSheetForm',
text: 'Create new Sheet',
text: w2utils.lang('Create new Sheet'),
style: 'border: 0px; background-color: transparent;',
fields: [
{field: 'id', text: "Id", type: 'float', required: true, html: {caption: 'Id'}},
{field: 'id', type: 'string', required: true, html: {caption: 'X:'}},
{
field: 'title',
type: 'text',
required: true,
html: {caption: 'Title', attr: 'style="width: 300px"'}
},
tooltip: "Enter the title of your sheet",
html: {caption: w2utils.lang('Title'), attr: 'style="width: 300px"'}
}
],
actions: {
"create": function () {
"Ok": function () {
if (this.validate().length == 0) {
uicontroller.$handle_command("c " + this.record.id + '"' + this.record.title + '"');
w2popup.close();
}
},
"reset": function () {
this.clear();
"Cancel": function () {
w2popup.close();
}
}
})
Expand Down Expand Up @@ -208,11 +211,11 @@
items: [
{type: 'button', id: 'tb_home', icon: 'fa fa-home', text: '<span id="lbZupfnoter">Zupfnoter</span>'},
{type: 'html', html: '<div style="width:25px"/>'},
{type: 'button', id: 'tb_create', text: 'create', icon: 'fa fa-plus-square-o', hint: 'Open in dropboxx'},
{type: 'button', id: 'tb_download', text: 'dl abc', icon: 'fa fa-save', hint: 'Save in dropbox'},
{type: 'button', id: 'tb_login', text: 'login', icon: 'fa fa-dropbox', hint: 'Open in dropboxx'},
{type: 'button', id: 'tb_open', text: 'open', icon: 'fa fa-dropbox', hint: 'Open in dropboxx'},
{type: 'button', id: 'tb_save', text: 'save', icon: 'fa fa-dropbox', hint: 'Save in dropbox'},
{type: 'button', id: 'tb_create', text: 'New', icon: 'fa fa-file-o', tooltip: 'Create new sheet'},
{type: 'button', id: 'tb_download', text: 'Dl abc', icon: 'fa fa-download', tooltip: 'download abc to local system'},
{type: 'button', id: 'tb_login', text: 'Login', icon: 'fa fa-dropbox', tooltip: 'Login in dropbox;\nchoose folder in Dropbox'},
{type: 'button', id: 'tb_open', text: 'Open', icon: 'fa fa-dropbox', tooltip: 'Open ABC file in dropbox'},
{type: 'button', id: 'tb_save', text: 'Save', icon: 'fa fa-dropbox', tooltip: 'Save ABC file in dropbox'},
{
type: 'html',
html: '<div style="padding: 5px; background-color: #f0f0f0;;"><span id="tbStatus" style="margin-top: 5px;"></span></div>'
Expand All @@ -225,56 +228,56 @@
{type: 'spacer'},

{
type: 'menu', text: "sheet config", id: 'config', icon: 'fa fa-gear',
type: 'menu', text: "sheet config", id: 'config', icon: 'fa fa-gear', tooltip: "configure your sheet",
items: [
{text: 'title', hint: "insert a title for the \ncurrent extract"},
{text: 'voices', hint: "specify voices to \nbe shown in current extract"},
{text: 'flowlines', hint: "specify for which voices \nwe show the flowline"},
{text: 'jumplines', hint: "specify for which voides \njumplines are shown"},
{text: 'repeatsigns', hint: "specify for which voices \nto use repeat signs instead of jumplines"},
{text: 'synchlines', hint: "specify which voices \nare connected by synchronization lines"},
{text: 'layoutlines', hint: "specify which voides \nare considerd to compute \nvertical spacing"},
{text: 'subflowlines', hint: "specify for which voices \nwe show the subflowline"},
{text: ''},

{text: 'legend', hint: "specify details for legend"},
{text: 'lyrics', hint: "specify details for lyrics"},
{text: 'notes', hint: "enter a note bound to the entire page"},
{id: 'title', text: 'Title', tooltip: "insert a title for the \ncurrent extract"},
{id: 'voices', tooltip: "specify voices to \nbe shown in current extract"},
{text: 'flowlines', tooltip: "specify for which voices \nwe show the flowline"},
{text: 'jumplines', tooltip: "specify for which voides \njumplines are shown"},
{text: 'repeatsigns', tooltip: "specify for which voices \nto use repeat signs instead of jumplines"},
{text: 'synchlines', tooltip: "specify which voices \nare connected by synchronization lines"},
{text: 'layoutlines', tooltip: "specify which voides \nare considerd to compute \nvertical spacing"},
{text: 'subflowlines', tooltip: "specify for which voices \nwe show the subflowline"},
{},

{text: 'legend', tooltip: "specify details for legend"},
{text: 'lyrics', tooltip: "specify details for lyrics"},
{text: 'notes', tooltip: "enter a note bound to the entire page"},
{text: ''},

{text: 'nonflowrest', hint: "specify if rests are shown outsid of flowlines"},
{text: 'startpos', hint: "specify the vertical start position of the notes"},
{text: 'countnotes', hint: "specify appeareance of countnotes"},
{text: 'layout', hint: "specify laoyut details \n(e.g. size of symbols)"},
{text: 'stringnames', hint: "specify output of stringnames.\n Stringnames help to tune the instrument"},
{text: 'nonflowrest', tooltip: "specify if rests are shown outsid of flowlines"},
{text: 'startpos', tooltip: "specify the vertical start position of the notes"},
{text: 'countnotes', tooltip: "specify appeareance of countnotes"},
{text: 'layout', tooltip: "specify laoyut details \n(e.g. size of symbols)"},
{text: 'stringnames', tooltip: "specify output of stringnames.\n Stringnames help to tune the instrument"},
{text: ''},
{text: 'produce', hint: "specify which extracts shall be saved as PDF"},
{text: 'produce', tooltip: "specify which extracts shall be saved as PDF"},
{
text: 'annotations',
hint: "specify predefined annotations\nAnnotations can be reused as note notebound anntoations"
tooltip: "specify predefined annotations\nAnnotations can be reused as note notebound anntoations"
},
{text: ''},
{text: 'stringnames.full', hint: "specify full details for stringnams"},
{text: 'repeatsigns.full', hint: "specify all details for repeat signs"},
{text: 'stringnames.full', tooltip: "specify full details for stringnams"},
{text: 'repeatsigns.full', tooltip: "specify all details for repeat signs"},
{text: ''},
{text: 'xx', hint: "inject the default configuration (for development use only)"},
{text: 'xx', tooltip: "inject the default configuration (for development use only)"},
]
},

{type: 'break'},
{type: 'button', id: 'tbPrintA3', text: 'A3', icon: 'fa fa-file-pdf-o', hint: 'Print PDF A3'},
{type: 'button', id: 'tbPrintA4', text: 'A4', icon: 'fa fa-file-pdf-o', hint: 'Print PDF A4'},
{type: 'button', id: 'tbPrintA3', text: 'A3', icon: 'fa fa-file-pdf-o', tooltip: 'Print PDF A3'},
{type: 'button', id: 'tbPrintA4', text: 'A4', icon: 'fa fa-file-pdf-o', tooltip: 'Print PDF A4'},

{type: 'break'},
{
type: 'menu', id: 'tb_scale', text: 'Zoom', icon: 'fa fa-search-plus', items: [
type: 'menu', id: 'tb_scale', text: 'Zoom', icon: 'fa fa-search-plus', tooltip: 'zoom harpnote preview', items: [
{text: 'large', id: 'groß'},
{text: 'medium', id: 'mittel'},
{text: 'small', id: 'klein'}
]
},
{
type: 'menu', id: 'tb_perspective', text: 'Perspective', icon: 'fa fa-binoculars', items: [
type: 'menu', id: 'tb_perspective', text: 'Perspective', icon: 'fa fa-binoculars', tooltip: 'set screen perspective', items: [
{text: 'All', icon: 'fa fa-th', id: 'Alle'},
{text: 'Enter Notes', icon: 'fa fa-music', id: 'NotenEingabe'},
{text: 'Enter Harp', icon: 'fa fa-file-picture-o', id: 'HarfenEingabe'},
Expand All @@ -284,18 +287,18 @@
},
{type: 'break', id: 'break0'},
{
type: 'menu', id: 'tb_view', text: 'Extract', icon: 'fa fa-shopping-basket', items: [
type: 'menu', id: 'tb_view', text: 'Extract', icon: 'fa fa-shopping-basket', tooltip: "Choose extract", items: [
{text: 'Extract 0', icon: 'fa fa-tags', id: "0"},
{text: 'Extract 1', icon: 'fa fa-tags', id: "1"},
{text: 'Extract 2', icon: 'fa fa-tags', id: "2"},
{text: 'Extract 3', icon: 'fa fa-tags', id: "3"}
]
},
{type: 'break'},
{type: 'button', id: 'tbRender', text: 'Render', icon: 'fa fa-refresh', hint: 'aktualisiert Ausgabe'},
{type: 'button', id: 'tbPlay', text: 'Play', icon: 'fa fa-play', hint: 'spielt ab Auswahl'},
{type: 'button', id: 'tbRender', text: 'Render', icon: 'fa fa-refresh', tooltip: 'Render previews'},
{type: 'button', id: 'tbPlay', text: 'Play', icon: 'fa fa-play', tooltip: 'Play music'},
{
type: 'menu', text: 'Help', id: 'tbHelp', icon: 'fa fa-question', hint: 'Hilfe', items: [
type: 'menu', text: 'Help', id: 'tbHelp', icon: 'fa fa-question', tooltip: 'Get help', items: [
{text: 'Videos', icon: 'fa fa-tags', id: "tbTutorials"},
{text: 'abc Tutorial', icon: 'fa fa-tags', id: "tbAbcTutorial"},
{text: 'Manual', icon: 'fa fa-tags', id: "tbManual"},
Expand Down Expand Up @@ -341,7 +344,7 @@
}
}

var pstyle = 'background-color: #F5F6F7; padding: 5px;';
var pstyle = 'background-color: #fffff; padding: 5px;';
$('#layout').w2layout({
name: 'layout',
panels: [
Expand Down
139 changes: 139 additions & 0 deletions 30_sources/SRC_Zupfnoter/public/locale/de-de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"locale": "de-DE",
"dateFormat": "dd.mm.yyyy",
"timeFormat": "h24:mm",
"datetimeFormat": "dd.mm.yyyy|h24:mm",
"currency": "^[-+]?[0-9]*[\\.]?[0-9]+\\€$",
"currencyPrefix": "",
"currencySuffix": "",
"groupSymbol": ".",
"decimalSymbol": ",",
"float": "^[-+]?[0-9]*[\\.,]?[0-9]+$",
"shortmonths": ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],
"fullmonths": ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],
"shortdays": ["Mo","Di","Mi","Do","Fr","Sa","So"],
"fulldays": ["Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],
"phrases": {
"Add new record": "Neues Element hinzufügen",
"Add New": "Neu",
"after": "nach",
"AJAX error. See console for more details.": "AJAX Fehler. Siehe Konsole für Details.",
"All Fields": "Suche",
"Are you sure you want to delete selected records?": "Die ausgewählten Elemente wirklich löschen?",
"Attach files by dragging and dropping or Click to Select": "Dateien per Drag&Drop hinzufügen oder per Mausklick auswählen",
"before": "vor",
"begins with": "beginnt mit",
"begins": "beginnt mit",
"between": "zwischen",
"buffered": "gepuffert",
"Cancel": "Abbrechen",
"Clear Search": "Suche zurücksetzen",
"Column": "Spalte",
"Confirmation": "Bestätigung",
"contains": "enthält",
"Current Date & Time": "Aktuelles Datum & Uhrzeit",
"Delete Confirmation": "Löschen bestätigen",
"Delete selected records": "Ausgewählte Elemente löschen",
"Delete": "Löschen",
"Edit Record": "Eintrag bearbeiten",
"Edit selected record": "Ausgewähltes Element editieren",
"Edit": "Editieren",
"Empty list": "Leere Liste",
"ends with": "endet mit",
"ends": "endet mit",
"Field should be equal to ": "Erwarteter Wert: ",
"Hide": "Verbergen",
"in": "in Liste",
"is not": "ist nicht",
"is": "ist",
"less than": "kleiner",
"letters or more...": "Zeichen oder mehr...",
"Line #": "Zeile #",
"Load": "Lade",
"Loading...": "Lädt ...",
"Modified": "Geändert",
"more than": "größer",
"More": "mehr",
"Multi Fields": "Detailsuche",
"Multiple Fields": "Mehrere Felder",
"Name": "Name",
"No items found": "Keine Einträge gefunden",
"No matches": "Keine Treffer",
"No": "Nein",
"none": "keine",
"Not a float": "Keine gültige Fließkommazahl",
"Not a hex number": "Keine gültige Hexadezimalzahl",
"Not a valid date": "Kein gültiges Datum",
"Not a valid email": "Keine gültige eMail-Adresse",
"Not alpha-numeric": "Keine gültige alpha-numerische Zeichenkette",
"Not an integer": "Keine gültige Zahl",
"Not in money format": "Keine gültiger Geldbetrag",
"not in": "nicht in Liste",
"Notification": "Nachricht",
"of": "von",
"Ok": "Ok",
"Open Search Fields": "Detailsuche öffnen",
"Record ID": "Zeilen ID",
"Records": "Zeilen",
"Refreshing...": "Aktualisiere...",
"Reload data in the list": "Liste aktualisieren",
"Remove": "Entfernen",
"Required field": "Pflichtfeld",
"Reset Column Size": "Spaltengröße zurücksetzen",
"Reset": "Zurücksetzen",
"Restore Default State": "Standardeinstellungen wiederherstellen",
"Returned data is not in valid JSON format.": "Zurückgegebene Daten sind nicht im JSON-Format.",
"Save changed records": "Geänderte Elemente speichern",
"Save Grid State": "Grid-Einstellungen speichern",
"Save": "Speichern",
"Saving...": "Speichere...",
"Search took": "Suchdauer:",
"Search": "Suchen",
"Search...": "Detailsuche...",
"sec": "sek",
"Select Hour": "Stunde wählen",
"Select Minute": "Minute wählen",
"Select Search Field": "Suchfeld auswählen",
"selected": "ausgewählt",
"Server Response": "Server-Antwort",
"Show": "Zeigen",
"Show/hide columns": "Spalten zeigen/verbergen",
"Size": "Größe",
"Skip": "Überspringe",
"Sorting took": "Sortierdauer: ",
"Toggle Line Numbers": "Zeilennummern ein/aus",
"Type to search...": "Suchen...",
"Type": "Typ",
"Yes": "Jau",
"Yesterday": "Gestern",
"Your remote data source record count has changed, reloading from the first record.": "Die Datenquelle hat sich geändert, lade Daten ab erstem Eintrag neu.",
"flowline": "Melodielinie",
"subflowline": "Hilfsmelodielinie",
"create": "erzeugen",
"Create new sheet": "Neues Blatt erstellen",
"Choose extract": "Auszug wählen",
"configure your sheet": "Blatt konfigureren",
"download abc to local system": "ABC - File herunterladen",
"Flowline": "Melodielinie",
"Get help": "Hilfe anzeigen",
"Help": "Hilfe",
"Id": "Identifikationsnummer",
"Login": "Einloggen",
"Login in dropbox;\nchoose folder in Dropbox": "In Dropbox einloggen;\nOrdner in Dropbox wählen",
"New": "Neu",
"Open": "Öffnen",
"Open ABC file in dropbox": "ABC-File in Dropbox öffnen",
"Perspective": "Ansicht",
"Play": "Spielen",
"Play music": "Noten wiedergeben",
"Print PDF A3": "PDF A3 drucken",
"Print PDF A4": "PDF A4 drucken",
"Render": "Rendern",
"Render previews": "Vorschauen neu errechnen",
"Save ABC file in dropbox": "ABC-File in Dropbox öffnen",
"set screen perspective": "Bildschirmansicht wählen",
"sheet config": "Konfiguration",
"Title": "Titel",
"zoom harpnote preview": "Zoom in Vorschau der Harfennoten"
}
}
Loading

0 comments on commit b932274

Please sign in to comment.