aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources/META-INF/resources/designer/lib/dialogs-default-translations.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/META-INF/resources/designer/lib/dialogs-default-translations.js')
-rw-r--r--src/main/resources/META-INF/resources/designer/lib/dialogs-default-translations.js50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/resources/META-INF/resources/designer/lib/dialogs-default-translations.js b/src/main/resources/META-INF/resources/designer/lib/dialogs-default-translations.js
new file mode 100644
index 00000000..2bf44662
--- /dev/null
+++ b/src/main/resources/META-INF/resources/designer/lib/dialogs-default-translations.js
@@ -0,0 +1,50 @@
+/**
+ * Dialog Default Translations.
+ *
+ * Include this module if you're not already using angular-translate in your application, and
+ * add it to your application module's dependency list in order to get default header and
+ * dialog messages to appear.
+ *
+ * Ex: var myApp = angular.module('myApplication',['dialogs.main','dialogs.default-translations']);
+ *
+ * It was necessary to separate this out for those already using angular-translate because this would
+ * automatically reset their translation list for 'en-US'
+ *
+ * For those already using angular-translate, just copy the list of DIALOG_[..] translations to your
+ * translation list where you set 'en-US' using the $translateProvider.
+ */
+
+//== Translations =============================================================//
+
+ angular.module('dialogs.default-translations',['pascalprecht.translate'])
+ /**
+ * Default translations in English.
+ *
+ * Use angular-translate's $translateProvider to provide translations in an
+ * alternate language.
+ *
+ * $translateProvider.translations('[lang]',{[translations]});
+ * To use alternate translations set the preferred language to your desired
+ * language.
+ * $translateProvider.preferredLanguage('[lang]');
+ */
+ .config(['$translateProvider',function($translateProvider){
+ $translateProvider.translations('en-US',{
+ DIALOGS_ERROR: "Error",
+ DIALOGS_ERROR_MSG: "An unknown error has occurred.",
+ DIALOGS_CLOSE: "Close",
+ DIALOGS_PLEASE_WAIT: "Please Wait",
+ DIALOGS_PLEASE_WAIT_ELIPS: "Please Wait...",
+ DIALOGS_PLEASE_WAIT_MSG: "Waiting on operation to complete.",
+ DIALOGS_PERCENT_COMPLETE: "% Complete",
+ DIALOGS_NOTIFICATION: "Notification",
+ DIALOGS_NOTIFICATION_MSG: "Unknown application notification.",
+ DIALOGS_CONFIRMATION: "Confirmation",
+ DIALOGS_CONFIRMATION_MSG: "Confirmation required.",
+ DIALOGS_OK: "OK",
+ DIALOGS_YES: "Yes",
+ DIALOGS_NO: "No"
+ });
+
+ $translateProvider.preferredLanguage('en-US');
+ }]); // end config \ No newline at end of file