partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 7d914c88769db37b0732890270a69fa22860c729
parent ebe08d29a501209018ced265797a79b60f328d52
Author: Felicitus <felicitus@felicitus.org>
Date:   Wed, 15 Jun 2011 15:07:38 +0800

Refactored locale stuff so we don't need to care about include order anymore. Additionally, we don't use language tags but
will use gettext() later, so get rid of those strings.

Diffstat:
Mfrontend/js/org.jerrymouse.util.locale/locale.js | 35+++++++++++++++--------------------
Dfrontend/js/org.jerrymouse.util.locale/locales/de_DE.js | 57---------------------------------------------------------
Dfrontend/js/org.jerrymouse.util.locale/locales/en_US.js | 82-------------------------------------------------------------------------------
3 files changed, 15 insertions(+), 159 deletions(-)

diff --git a/frontend/js/org.jerrymouse.util.locale/locale.js b/frontend/js/org.jerrymouse.util.locale/locale.js @@ -12,6 +12,19 @@ * */ +Ext.locales = { + de_DE: { + "flag": "de", + "name": "Deutsch (Deutschland)", + "dateformat": "d.m.Y H:i:s T" + }, + en_US: { + "flag": "us", + "name": "English (USA)", + "dateformat": "n/j/Y H:i:s T" + } +}; + Ext.setLocale = function (locale) { Ext.jm_locale = locale; }; @@ -21,26 +34,9 @@ Ext.getLocale = function () { }; Ext.getLocaleFlag = function () { - return locales[Ext.jm_locale].flag; + return Ext.locales[Ext.jm_locale].flag; }; Ext.getDateFormat = function () { - return locales[Ext.jm_locale].dateformat; + return Ext.locales[Ext.jm_locale].dateformat; }; - -Ext.replaceLocaleTags = function (string) { - var regexp = /\$\[(.+?)\]/g; - var workingCopy = string; - - /*while (result = regexp.exec(string)) { - if (locales[Ext.jm_locale][result[1]]) { - workingCopy = Ext.replaceString(result[0], locales[Ext.jm_locale][result[1]], workingCopy); - } - }*/ - - return workingCopy; -}; - -Ext.replaceString = function (search, replace, subject) { - return subject.split(search).join(replace); -};- \ No newline at end of file diff --git a/frontend/js/org.jerrymouse.util.locale/locales/de_DE.js b/frontend/js/org.jerrymouse.util.locale/locales/de_DE.js @@ -1,56 +0,0 @@ -locales.de_DE = { - "flag": "de", - "name": "Deutsch (Deutschland)", - "dateformat": "d.m.Y H:i:s T", - - /* General */ - "org.jerrymouse.gui.help": "Kontext-Sensitive Hilfe", - "org.jerrymouse.gui.help.loading_message": "Lade Hilfe...", - "org.jerrymouse.gui.connectionbutton.connected": "Verbunden", - "org.jerrymouse.gui.connectionbutton.notconnected": "Nicht verbunden", - - /* Menu Items */ - "org.jerrymouse.gui.menu.system": "System", - "org.jerrymouse.gui.menu.system.connect": "Verbinden...", - "org.jerrymouse.gui.menu.system.disconnect": "Trennen", - "org.jerrymouse.gui.menu.help": "Hilfe", - "org.jerrymouse.gui.menu.help.whatsthis": "Kontext-Sensitive Hilfe", - - /* Login Window */ - "org.jerrymouse.gui.login.login": "Anmelden", - "org.jerrymouse.gui.login.login_button": "Anmelden", - "org.jerrymouse.gui.login.close_button": "Schließen", - "org.jerrymouse.gui.login.username_label": "Benutzername", - "org.jerrymouse.gui.login.password_label": "Passwort", - "org.jerrymouse.gui.login.server": "Server", - "org.jerrymouse.gui.login.login_loading_message": "Anmelden...", - - /* Status Bar */ - "org.jerrymouse.components.Statusbar.Ready": "Bereit.", - - "de.RaumZeitLabor.PartKeepr.save": "Speichern", - "de.RaumZeitLabor.PartKeepr.cancel": "Abbrechen", - - /* Footprints */ - "de.RaumZeitLabor.PartKeepr.FootPrintManager.manage": "Footprints verwalten", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.add": "Footprint erzeugen", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.delete": "Footprint löschen", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.reload": "Footprints neu laden", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.loading": "Footprints werden geladen...", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.footprint": "Footprint", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.addFootprintDialogTitle": "Footprint erzeugen", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.addFootprintDialogMessage":"Name des Footprints:", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.addFootprint": "Footprint wird erzeugt...", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.deleteFootprintDialogTitle": "Footprint löschen", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.deleteFootprintDialogMessage":"Den Footprint %s wirklich löschen?", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.deleteFootprint": "Footprint wird gelöscht...", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.loadFootprint": "Footprint wird geladen...", - - /* Category Editor */ - "de.RaumZeitLabor.PartKeepr.CategoryEditor.categoryName": "Kategoriename", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.categoryDescription": "Beschreibung", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.parentCategory": "Übergeordnete Kategorie", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.loadCategor": "Kategorie wird geladen...", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.saveCategory": "Kategorie wird gespeichert..." - -};- \ No newline at end of file diff --git a/frontend/js/org.jerrymouse.util.locale/locales/en_US.js b/frontend/js/org.jerrymouse.util.locale/locales/en_US.js @@ -1,82 +0,0 @@ -var locales = {}; - -locales.en_US = { - "flag": "us", - "name": "English (USA)", - "dateformat": "n/j/Y H:i:s T", - - /* General */ - "org.jerrymouse.gui.help": "What's this help", - "org.jerrymouse.gui.help.loading_message": "Loading Help...", - "org.jerrymouse.gui.connectionbutton.connected": "Connected", - "org.jerrymouse.gui.connectionbutton.notconnected": "Not Connected", - - /* Menu Items */ - "org.jerrymouse.gui.menu.system": "System", - "org.jerrymouse.gui.menu.system.connect": "Connect...", - "org.jerrymouse.gui.menu.system.disconnect": "Disconnect", - "org.jerrymouse.gui.menu.help": "Help", - "org.jerrymouse.gui.menu.help.whatsthis": "What's this help", - - /* Login Window */ - "org.jerrymouse.gui.login.login": "Login", - "org.jerrymouse.gui.login.login_button": "Login", - "org.jerrymouse.gui.login.close_button": "Close", - "org.jerrymouse.gui.login.username_label": "Username", - "org.jerrymouse.gui.login.password_label": "Password", - "org.jerrymouse.gui.login.server": "Server", - "org.jerrymouse.gui.login.login_loading_message": "Logging in...", - - /* Status Bar */ - "org.jerrymouse.components.Statusbar.Ready": "Ready.", - - "de.RaumZeitLabor.PartKeepr.save": "Save", - "de.RaumZeitLabor.PartKeepr.cancel": "Cancel", - - /* Footprints */ - "de.RaumZeitLabor.PartKeepr.FootPrintManager.manage": "Manage Footprints", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.add": "Add Footprint", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.delete": "Delete Footprint", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.reload": "Reload Footprints", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.loading": "Loading Footprints...", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.footprint": "Footprint", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.addFootprintDialogTitle": "Add Footprint", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.addFootprintDialogMessage":"Footprint Name:", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.addFootprint": "Creating Footprint...", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.deleteFootprintDialogTitle": "Delete Footprint", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.deleteFootprintDialogMessage":"Really delete Footprint %s?", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.deleteFootprint": "Deleting Footprint...", - "de.RaumZeitLabor.PartKeepr.FootPrintManager.loadFootprint": "Loading Footprint...", - - /* Category Editor */ - "de.RaumZeitLabor.PartKeepr.CategoryEditor.categoryName": "Category Name", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.categoryDescription": "Description", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.parentCategory": "Parent Category", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.loadCategor": "Loading Category...", - "de.RaumZeitLabor.PartKeepr.CategoryEditor.saveCategory": "Saving Category...", - - /* Storage Locations */ - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.manage": "Manage Storage Locations", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.name": "Storage Location Name", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.add": "Add Storage Location", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.delete": "Delete Storage Location", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.deleteStorageLocationDialogTitle": "Delete Storage Location", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.deleteStorageLocationDialogMessage": "Do you really wish to delete the selected storage location?", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.addStorageLocationDialogTitle": "Add a new storage location", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.addStorageLocationDialogMessage": "Enter the name of the new storage location:", - "de.RaumZeitLabor.PartKeepr.StorageLocationManager.name": "Name", - - /* Manufacturers */ - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.manage": "Manage Manufacturers", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.name": "Manufacturer Name", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.add": "Add Manufacturer", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.delete": "Delete Manufacturer", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.deleteManufacturerDialogTitle": "Delete Manufacturer", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.deleteManufacturerDialogMessage": "Do you really wish to delete the selected manufacturer?", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.addManufacturerDialogTitle": "Add a new manufacturer", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.addManufacturerDialogMessage": "Enter the name of the new manufacturer:", - "de.RaumZeitLabor.PartKeepr.ManufacturerManager.name": "Name", - - /* Parts */ - "de.RaumZeitLabor.PartKeepr.PartsManager.manage": "Manage Parts" -};