Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 34f2ac5

Browse files
skttlleekelleher
authored andcommitted
adds localization
1 parent 867fb7c commit 34f2ac5

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,27 @@
88
'assetsService',
99
"Our.Umbraco.DocTypeGridEditor.Resources.DocTypeGridEditorResources",
1010
"umbRequestHelper",
11+
"localizationService",
1112

12-
function ($scope, $rootScope, $timeout, $routeParams, editorState, assetsService, dtgeResources, umbRequestHelper) {
13+
function ($scope, $rootScope, $timeout, $routeParams, editorState, assetsService, dtgeResources, umbRequestHelper, localizationService) {
1314

1415
$scope.title = "Click to insert item";
16+
$scope.selectContentTypeLabel = "Choose a content type";
17+
var overlayTitle = "Edit item";
1518
$scope.icon = "icon-item-arrangement";
1619
$scope.overlay = {};
1720
$scope.overlay.show = false;
1821
$scope.overlay.view =
1922
umbRequestHelper.convertVirtualToAbsolutePath(
2023
"~/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html");
2124

25+
// localize strings
26+
localizationService.localizeMany(["docTypeGridEditor_insertItem", "docTypeGridEditor_editItem", "docTypeGridEditor_selectContentType"]).then(function (data) {
27+
$scope.title = data[0];
28+
overlayTitle = data[1];
29+
$scope.selectContentTypeLabel = data[2];
30+
});
31+
2232
$scope.setValue = function (data, callback) {
2333
$scope.control.value = data;
2434
if (!("id" in $scope.control.value) || $scope.control.value.id == "") {
@@ -42,7 +52,7 @@
4252

4353
$scope.overlay = {};
4454
$scope.overlay.show = true;
45-
$scope.overlay.title = "Edit item";
55+
$scope.overlay.title = overlayTitle;
4656
$scope.overlay.submitButtonLabelKey = "buttons_save";
4757
$scope.overlay.view =
4858
umbRequestHelper.convertVirtualToAbsolutePath(
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
3+
<language alias="da" intName="Danish" localName="dansk" lcid="6" culture="da-DK">
4+
<area alias="docTypeGridEditor">
5+
<key alias="selectContentType">Vælg en indholdstype</key>
6+
<key alias="editItem">Rediger indhold</key>
7+
<key alias="insertItem">Klik for at indsætte</key>
8+
</area>
9+
</language>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
3+
<language alias="en" intName="English" localName="english" lcid="6" culture="en-GB">
4+
<area alias="docTypeGridEditor">
5+
<key alias="selectContentType">Select a content type</key>
6+
<key alias="editItem">Edit item</key>
7+
<key alias="insertItem">Click to insert item</key>
8+
</area>
9+
</language>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
3+
<language alias="en" intName="English" localName="english" lcid="6" culture="en-US">
4+
<area alias="docTypeGridEditor">
5+
<key alias="selectContentType">Select a content type</key>
6+
<key alias="editItem">Edit item</key>
7+
<key alias="insertItem">Click to insert item</key>
8+
</area>
9+
</language>

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div ng-switch="dialogMode">
44
<div ng-switch-when="selectDocType">
5-
<h5>Select a content type</h5>
5+
<umb-control-group label="{{ selectContentTypeLabel }}" ng-switch-when="selectDocType">
66
<ul class="umb-actions umb-actions-child">
77
<li data-element="action-create-{{docType.alias}}" ng-repeat="docType in docTypes | orderBy:'name':false">
88
<a ng-click="selectDocType(docType.alias)">

0 commit comments

Comments
 (0)