2bf44662de5879178fdb9708215404f1b4d47e5b
[clamp.git] / src / main / resources / META-INF / resources / designer / lib / dialogs-default-translations.js
1 /**
2  * Dialog Default Translations.
3  *
4  * Include this module if you're not already using angular-translate in your application, and
5  * add it to your application module's dependency list in order to get default header and 
6  * dialog messages to appear.
7  * 
8  * Ex: var myApp = angular.module('myApplication',['dialogs.main','dialogs.default-translations']);
9  *
10  * It was necessary to separate this out for those already using angular-translate because this would
11  * automatically reset their translation list for 'en-US'
12  *
13  * For those already using angular-translate, just copy the list of DIALOG_[..] translations to your
14  * translation list where you set 'en-US' using the $translateProvider.
15  */
16
17 //== Translations =============================================================//
18
19  angular.module('dialogs.default-translations',['pascalprecht.translate'])
20  /**
21      * Default translations in English.
22      * 
23      * Use angular-translate's $translateProvider to provide translations in an
24      * alternate language.
25      *
26      * $translateProvider.translations('[lang]',{[translations]});
27      * To use alternate translations set the preferred language to your desired
28      * language.
29      * $translateProvider.preferredLanguage('[lang]');
30      */
31     .config(['$translateProvider',function($translateProvider){
32         $translateProvider.translations('en-US',{
33             DIALOGS_ERROR: "Error",
34             DIALOGS_ERROR_MSG: "An unknown error has occurred.",
35             DIALOGS_CLOSE: "Close",
36             DIALOGS_PLEASE_WAIT: "Please Wait",
37             DIALOGS_PLEASE_WAIT_ELIPS: "Please Wait...",
38             DIALOGS_PLEASE_WAIT_MSG: "Waiting on operation to complete.",
39             DIALOGS_PERCENT_COMPLETE: "% Complete",
40             DIALOGS_NOTIFICATION: "Notification",
41             DIALOGS_NOTIFICATION_MSG: "Unknown application notification.",
42             DIALOGS_CONFIRMATION: "Confirmation",
43             DIALOGS_CONFIRMATION_MSG: "Confirmation required.",
44             DIALOGS_OK: "OK",
45             DIALOGS_YES: "Yes",
46             DIALOGS_NO: "No"
47         });
48
49         $translateProvider.preferredLanguage('en-US');
50     }]); // end config