<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/user.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/navbar.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/i18n.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/date.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/op_change.js"></script>
<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/lovefield.js"></script>
s.ITEM_NOT_FOUND = "[% l('Item not found') %]";
s.CONFIRM_CLEAR_PENDING = "[% l('Clear pending transactions') %]";
s.CONFIRM_CLEAR_PENDING_BODY = "[% l('Are you certain you want to clear these pending offline transactions? This action is irreversible. Transactions cannot be recovered after clearing!') %]";
+ s.LOCATION_NAME_OU_QUALIFIED = "[% l('{{location_name}} ({{owning_lib_shortname}})') %]";
}]);
</script>
'services/ui.js',
'services/date.js',
'services/op_change.js',
- 'services/file.js'
+ 'services/file.js',
+ 'services/i18n.js'
],
dest: 'build/js/<%= pkg.name %>.<%= pkg.version %>.min.js'
},
.factory('egCore',
['egIDL','egNet','egEnv','egOrg','egPCRUD','egEvent','egAuth',
'egPerm','egHatch','egPrint','egStartup','egStrings','egAudio',
- 'egDate',
+ 'egDate','egI18N',
function(egIDL , egNet , egEnv , egOrg , egPCRUD , egEvent , egAuth ,
egPerm , egHatch , egPrint , egStartup , egStrings , egAudio ,
- egDate) {
+ egDate , egI18N) {
return {
idl : egIDL,
startup : egStartup,
strings : egStrings,
audio : egAudio,
- date : egDate
+ date : egDate,
+ i18n : egI18N
};
}]);
--- /dev/null
+/**
+ * egI18N : service for I18N and L10N functions
+ *
+ * This is a grab-bag of stuff related to I18N.
+ *
+ */
+
+angular.module('egCoreMod')
+.factory('egI18N', ['egStrings',
+ function(egStrings) {
+ return {
+ ou_qualified_location_name : function(loc) {
+ return egStrings.$replace(
+ egStrings.LOCATION_NAME_OU_QUALIFIED,
+ {
+ location_name : loc.name(),
+ owning_lib_shortname : loc.owning_lib().shortname()
+ }
+ );
+ }
+ }
+}]);
'services/lovefield.js',
'services/navbar.js', 'services/date.js',
'services/user-bucket.js',
+ 'services/i18n.js',
// load app scripts
'app.js',
'circ/**/*.js',