Skip to content

Commit

Permalink
Create content template localization (#10945)
Browse files Browse the repository at this point in the history
* Don't use self-closing element for custom HTML elements

* Use button element for close/cancel in copy dialog

* Update localization of "createBlueprintFrom"

Co-authored-by: Nathan Woulfe <[email protected]>
  • Loading branch information
bjarnef and nathanwoulfe authored Sep 22, 2021
1 parent 31ecc14 commit 48a3a05
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
name: $scope.currentNode.name
};

localizationService.localize("blueprints_createBlueprintFrom", ["<em>" + $scope.message.name + "</em>"]).then(function (localizedVal) {
localizationService.localize("blueprints_createBlueprintFrom", [$scope.message.name]).then(localizedVal => {
$scope.title = localizedVal;
});

Expand All @@ -33,14 +33,13 @@

navigationService.hideMenu();
},
function (err) {
formHelper.resetForm({ scope: $scope, hasErrors: true });
contentEditingHelper.handleSaveError({
err: err
});

}
);
function (err) {
formHelper.resetForm({ scope: $scope, hasErrors: true });
contentEditingHelper.handleSaveError({
err: err
});

});
}
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/Umbraco.Web.UI.Client/src/views/content/copy.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@
</div>

<div class="umb-dialog-footer btn-toolbar umb-btn-toolbar" ng-hide="success">
<a class="btn btn-link" ng-click="closeDialog()" ng-show="!busy">
<button type="button" class="btn btn-link" ng-click="closeDialog()" ng-show="!busy">
<localize key="general_cancel">Cancel</localize>
</a>
<button class="btn btn-primary" ng-click="copy()" ng-disabled="busy || !target">
</button>
<button type="button" class="btn btn-primary" ng-click="copy()" ng-disabled="busy || !target">
<localize key="actions_copy">Copy</localize>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h5 ng-bind-html="title"></h5>
<input type="text" name="name" ng-model="message.name" class="umb-textstring textstring input-block-level"
val-server-field="name"
required />
<span ng-messages="blueprintForm.name.$error" show-validation-on-submit >
<span ng-messages="blueprintForm.name.$error" show-validation-on-submit>
<span class="help-inline" ng-message="required"><localize key="required">Required</localize></span>
<span class="help-inline" ng-message="valServerField">{{blueprintForm.name.errorMsg}}</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h5><localize key="create_createUnder">Create an item under</localize> {{current
<umb-load-indicator ng-if="vm.loading"></umb-load-indicator>

<ul class="umb-actions umb-actions-child">
<li class="umb-action" ng-repeat="documentType in vm.documentTypes |orderBy:'name':false">
<li class="umb-action" ng-repeat="documentType in vm.documentTypes | orderBy:'name':false">
<button type="button" class="umb-action-link umb-outline btn-reset" ng-click="vm.createBlueprint(documentType)">
<umb-icon icon="{{documentType.icon}}" class="icon large"></umb-icon>
<span class="menu-label">
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
<key alias="nodeIsInTrash">This item is in the Recycle Bin</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Vytvořit novou šablonu obsahu z '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Vytvořit novou šablonu obsahu z <em>%0%</em>]]></key>
<key alias="blankBlueprint">Prázdná</key>
<key alias="selectBlueprint">Vybrat obsahovou šablonu</key>
<key alias="createdBlueprintHeading">Šablona obsahu byla vytvořena</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/cy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
<key alias="nodeIsInTrash">Mae'r eitem yma yn y Bin Ailgylchu</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Creu Templed Cynnwys newydd o '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Creu Templed Cynnwys newydd o <em>%0%</em>]]></key>
<key alias="blankBlueprint">Gwag</key>
<key alias="selectBlueprint">Dewis Templed Cynnwys</key>
<key alias="createdBlueprintHeading">Templed Cynnwys wedi'i greu</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
<key alias="nodeIsInTrash">Dette element er i papirkurven</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Opret en ny indholdsskabelon fra '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Opret en ny indholdsskabelon fra <em>%0%</em>]]></key>
<key alias="blankBlueprint">Blank</key>
<key alias="selectBlueprint">Vælg en indholdsskabelon</key>
<key alias="createdBlueprintHeading">Indholdsskabelon oprettet</key>
Expand Down
4 changes: 2 additions & 2 deletions src/Umbraco.Web.UI/Umbraco/config/lang/de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@
<key alias="createEmpty">Neues Element anlegen</key>
<key alias="createFromClipboard">Aus der Zwischenablage einfügen</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Erzeuge eine neue Inhaltsvorlage von '%0%'</key>
<area alias="blueprints">
<key alias="createBlueprintFrom"><![CDATA[Erzeuge eine neue Inhaltsvorlage von <em>%0%</em>]]></key>
<key alias="blankBlueprint">Leer</key>
<key alias="selectBlueprint">Wählen Sie eine Inhaltsvorlage</key>
<key alias="createdBlueprintHeading">Inhaltsvorlage erzeugt</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
<key alias="nodeIsInTrash">This item is in the Recycle Bin</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Create a new Content Template from '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Create a new Content Template from <em>%0%</em>]]></key>
<key alias="blankBlueprint">Blank</key>
<key alias="selectBlueprint">Select a Content Template</key>
<key alias="createdBlueprintHeading">Content Template created</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
<key alias="nodeIsInTrash">This item is in the Recycle Bin</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Create a new Content Template from '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Create a new Content Template from <em>%0%</em>]]></key>
<key alias="blankBlueprint">Blank</key>
<key alias="selectBlueprint">Select a Content Template</key>
<key alias="createdBlueprintHeading">Content Template created</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
<key alias="contentRoot">Raíz de contenido</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Crear nueva Plantilla de Contenido desde '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Crear nueva Plantilla de Contenido desde <em>%0%</em>]]></key>
<key alias="blankBlueprint">Vacía</key>
<key alias="selectBlueprint">Seleccionar Plantilla de Contenido</key>
<key alias="createdBlueprintHeading">Plantilla de Contenido creada</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
<key alias="createFromClipboard">Copier du clipboard</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Créer un nouveau Modèle de Contenu à partir de '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Créer un nouveau Modèle de Contenu à partir de <em>%0%</em>]]></key>
<key alias="blankBlueprint">Vide</key>
<key alias="selectBlueprint">Sélectionner un Modèle de Contenu</key>
<key alias="createdBlueprintHeading">Modèle de Contenu créé</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/nl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@
<key alias="nodeIsInTrash">Dit item is in de prullenbak</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Nieuw Inhoudssjabloon aanmaken voor '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Nieuw Inhoudssjabloon aanmaken voor <em>%0%</em>]]></key>
<key alias="blankBlueprint">Leeg</key>
<key alias="selectBlueprint">Selecteer een Inhoudssjabloon</key>
<key alias="createdBlueprintHeading">Inhoudssjabloon aangemaakt</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/pl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<key alias="contentRoot">Korzeń zawartości</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Stwórz nowy Szablon Zawartości z '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Stwórz nowy Szablon Zawartości z <em>%0%</em>]]></key>
<key alias="blankBlueprint">Pusty</key>
<key alias="selectBlueprint">Wybierz Szablon Zawartości</key>
<key alias="createdBlueprintHeading">Szablon Zawartości został stworzony</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/ru.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<key alias="atViewingFor">Наблюдать за</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Создать новый шаблон содержимого из '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Создать новый шаблон содержимого из <em>%0%</em>]]></key>
<key alias="blankBlueprint">Пустой</key>
<key alias="selectBlueprint">Выбрать шаблон содержимого</key>
<key alias="createdBlueprintHeading">Шаблон содержимого создан</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/sv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<key alias="historyIncludingVariants">Historik (alla varianter)</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">Skapa en ny innehållsmall för '%0%'</key>
<key alias="createBlueprintFrom"><![CDATA[Skapa en ny innehållsmall för <em>%0%</em>]]></key>
<key alias="blankBlueprint">Tom</key>
<key alias="selectBlueprint">Välj en innehållsmall</key>
<key alias="createdBlueprintHeading">Innehållsmall skapad</key>
Expand Down
2 changes: 1 addition & 1 deletion src/Umbraco.Web.UI/Umbraco/config/lang/tr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
<key alias="nodeIsInTrash">Bu öğe Geri Dönüşüm Kutusu'nda</key>
</area>
<area alias="blueprints">
<key alias="createBlueprintFrom">'%0%' den yeni bir İçerik Şablonu oluşturun</key>
<key alias="createBlueprintFrom"><![CDATA[<em>%0%</em> den yeni bir İçerik Şablonu oluşturun]]></key>
<key alias="blankBlueprint">Boş</key>
<key alias="selectBlueprint">Bir İçerik Şablonu Seçin</key>
<key alias="createdBlueprintHeading">İçerik Şablonu oluşturuldu</key>
Expand Down

0 comments on commit 48a3a05

Please sign in to comment.