From cd6af45afb20ebb38b405dde8d4101fe7e996a36 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 9 Jan 2014 13:29:41 -0500 Subject: [PATCH] added icons to all h1s in admin panel languages tab in ACP each language now also has a "language.json" --- public/language/de/language.json | 4 +++ public/language/en/language.json | 4 +++ public/language/es/language.json | 4 +++ public/language/fr/language.json | 4 +++ public/src/forum/admin/languages.js | 5 +++ public/src/translator.js | 3 +- public/templates/admin/categories.tpl | 2 +- public/templates/admin/database.tpl | 4 +-- public/templates/admin/events.tpl | 2 +- public/templates/admin/facebook.tpl | 2 +- public/templates/admin/gplus.tpl | 2 +- public/templates/admin/groups.tpl | 4 +-- public/templates/admin/header.tpl | 1 + public/templates/admin/languages.tpl | 24 +++++++++++++ public/templates/admin/logger.tpl | 2 +- public/templates/admin/motd.tpl | 3 +- public/templates/admin/plugins.tpl | 2 +- public/templates/admin/settings.tpl | 4 +-- public/templates/admin/themes.tpl | 2 +- public/templates/admin/topics.tpl | 2 +- public/templates/admin/twitter.tpl | 2 +- public/templates/admin/users.tpl | 2 +- public/templates/config.json | 1 + src/languages.js | 51 +++++++++++++++++++++++++++ src/routes/admin.js | 17 ++++++--- src/routes/debug.js | 8 ----- 26 files changed, 128 insertions(+), 33 deletions(-) create mode 100644 public/language/de/language.json create mode 100644 public/language/en/language.json create mode 100644 public/language/es/language.json create mode 100644 public/language/fr/language.json create mode 100644 public/src/forum/admin/languages.js create mode 100644 public/templates/admin/languages.tpl create mode 100644 src/languages.js diff --git a/public/language/de/language.json b/public/language/de/language.json new file mode 100644 index 0000000000..c54ded42e4 --- /dev/null +++ b/public/language/de/language.json @@ -0,0 +1,4 @@ +{ + "name": "German", + "code": "de" +} \ No newline at end of file diff --git a/public/language/en/language.json b/public/language/en/language.json new file mode 100644 index 0000000000..c96e8e9f8e --- /dev/null +++ b/public/language/en/language.json @@ -0,0 +1,4 @@ +{ + "name": "English", + "code": "en" +} \ No newline at end of file diff --git a/public/language/es/language.json b/public/language/es/language.json new file mode 100644 index 0000000000..32e8b29aef --- /dev/null +++ b/public/language/es/language.json @@ -0,0 +1,4 @@ +{ + "name": "Spanish", + "code": "es" +} \ No newline at end of file diff --git a/public/language/fr/language.json b/public/language/fr/language.json new file mode 100644 index 0000000000..5d539de773 --- /dev/null +++ b/public/language/fr/language.json @@ -0,0 +1,4 @@ +{ + "name": "French", + "code": "fr" +} \ No newline at end of file diff --git a/public/src/forum/admin/languages.js b/public/src/forum/admin/languages.js new file mode 100644 index 0000000000..44182e3a13 --- /dev/null +++ b/public/src/forum/admin/languages.js @@ -0,0 +1,5 @@ +define(['forum/admin/settings'], function(Settings) { + jQuery('document').ready(function() { + Settings.prepare(); + }); +}); \ No newline at end of file diff --git a/public/src/translator.js b/public/src/translator.js index fb8f602006..0808bacff3 100644 --- a/public/src/translator.js +++ b/public/src/translator.js @@ -8,8 +8,7 @@ * 1. language en is hardcoded while system is developed. to switch language packs for now please edit DEFAULT_LANGUAGE * b. need to write fallback system to default language if keys are missing (is this even necessary?) * 2. recursion needed when parsing language keys (ex. topics:modal.delete.title), right now json is all one level deep - * 3. server side settings for default language - * 4. user side settings for preferred language + * 3. user side settings for preferred language * */ diff --git a/public/templates/admin/categories.tpl b/public/templates/admin/categories.tpl index 927b690220..06ae5a0804 100644 --- a/public/templates/admin/categories.tpl +++ b/public/templates/admin/categories.tpl @@ -1,6 +1,6 @@
-

Categories

+

Categories