Skip to content
This repository has been archived by the owner on Nov 3, 2017. It is now read-only.

uMobile internationalization using Polyglot.js #49

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ module.exports = function (grunt) {
'www/js/lib/backbone/backbone-validation.min.js': ['src/js/lib/backbone/backbone-validation.js'],
'www/js/lib/handlebars/handlebars.min.js': ['src/js/lib/handlebars/handlebars.js'],
'www/js/lib/bootstrap/bootstrap.min.js': ['src/js/lib/bootstrap/bootstrap.js'],
'www/js/lib/polyglot/polyglot.min.js': ['src/js/lib/polyglot/polyglot.js'],
'www/js/lib/debug/debug.min.js': ['src/js/lib/debug/debug.js'],

'www/js/src/main.min.js': [
Expand Down Expand Up @@ -176,7 +177,8 @@ module.exports = function (grunt) {
'src/js/src/view/LoginView.js',
'src/js/src/view/Module.js',
'src/js/src/view/ModuleView.js',
'src/js/src/view/Notifier.js'
'src/js/src/view/Notifier.js',
'src/js/src/view/Error.js'

]
}
Expand Down
1 change: 0 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*jshint es5:true */
/*global require:true, __dirname:true, console:true, process:true, setTimeout:true */

// Modules & Variables.
Expand Down
3 changes: 2 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ config.getPublicDirectory = function () {
};

config.getOptionsForLess = function() {
'use strict';
var options = {
compress: config.isDevelopment() ? false : true,
cleancss: config.isDevelopment() ? false : true,
report: config.isDevelopment() ? 'min' : 'gzip',
optimization: config.isDevelopment() ? 1 : 5,
}
};
return options;
};

Expand Down
45 changes: 45 additions & 0 deletions src/data/i18n/messages_en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"breadcrumb" : {
"home" : "Home"
},
"footer" : {
"call_to_login" : "Login for Personalized Content"
},
"header" : {
"title" : "uMobile"
},
"login" : {
"warning" : "Warning.",
"sign_in" : "Sign In",
"username_label" : "Username:",
"username_placeholder" : "Username",
"password_label" : "Password:",
"password_placeholder" : "Password",
"submit" : "Go",
"validationError": "You have errors with your username or password.",
"guestLoginError": "We tried to log you into the portal as a guest but something went wrong. Please try to login with your credentials.",
"loginError": "We tried to log you into the portal but something went wrong. Please try to login again.",
"error_username" : "Username is required",
"error_password" : "Password is required"
},
"notifier" : {
"login" : "Login",
"title" : "Welcome.",
"message" : "It looks like you need to login. Click the below login button to sign into uMobile."
},
"module" : {
"to_view" : "To view %{0}"
},
"calendar" : {
"title" : "Calendar"
},
"courses" : {
"title" : "Courses"
},
"map" : {
"title" : "Map"
},
"news" : {
"title" : "News"
}
}
45 changes: 45 additions & 0 deletions src/data/i18n/messages_fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"breadcrumb" : {
"home" : "Accueil"
},
"footer" : {
"call_to_login" : "Se connecter pour un contenu personnalisé"
},
"header" : {
"title" : "uMobile"
},
"login" : {
"warning" : "Attention.",
"sign_in" : "Se connecter",
"username_label" : "Nom d'utilisateur :",
"username_placeholder" : "Nom d'utilisateur",
"password_label" : "Mot de passe :",
"password_placeholder" : "Mot de passe",
"submit" : "Se connecter",
"validationError": "Votre nom d'utilisateur ou votre mot de passe est incorrect.",
"guestLoginError": "Impossible de vous authentifier au portail en tant qu'invité. Merci de vous connecter avec votre nom d'utilisateur et mot de passe",
"loginError": "Impossible de vous authentifier au portail. Merci de réessayer.",
"error_username" : "Le nom d'utilisateur est requis.",
"error_password" : "Le mot de passe est requis."
},
"notifier" : {
"login" : "Se connecter",
"title" : "Bienvenue.",
"message" : "Il semblerais que vous ayez besoin de vous connecter. Cliquez sur le bouton ci-dessous pour vous connecter à uMobile."
},
"module" : {
"to_view" : "Aller à %{0}"
},
"calendar" : {
"title" : "Calendrier"
},
"courses" : {
"title" : "Cours"
},
"map" : {
"title" : "Carte"
},
"news" : {
"title" : "Informations"
}
}
Loading