Skip to content

Commit

Permalink
Add Japanese translations for group
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuhitoyokoi committed Feb 5, 2024
1 parent 3367fd4 commit e869cfe
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 26 deletions.
26 changes: 13 additions & 13 deletions nodes/config/locales/en-US/ui_group.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"ui-group" : {
"label" : {
"name" : "Name",
"tab" : "Tab",
"width" : "Width",
"default" : "Default",
"group" : "Group",
"unassigned" : "unassigned",
"ui-group": {
"label": {
"name": "Name",
"page": "Page",
"size": "Size",
"display-name": "Display group name",
"className": "Class",
"classNamePlaceholder": "Optional CSS class name(s) for widget",
"classNamePlaceholder": "Optional CSS class name(s) for group",
"defaultState": "Default State",
"visibility": "Visibility",
"visible": "Visible",
"hidden": "Hidden",
"interactivity": "Interactivity",
"active": "Active",
"disabled": "Disabled"
},
"display-name" : "Display group name",
"collapse-name" : "Allow group to be collapsed"
"disabled": "Disabled",
"openDashboardSidebar": "Open Dashboard 2.0 Sidebar"
}
}
}
4 changes: 4 additions & 0 deletions nodes/config/locales/ja/ui_group.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<script type="text/html" data-help-name="ui-group">
<p>グループ</p>
<p>もし<b>クラス</b>を指定している場合は、 親のカードに追加されます。この方法でカスタムCSSを用いてカードとその中の要素の様式を設定できます。<code>msg.className</code> の文字列プロパティを用いることで、クラスを実行時に設定することもできます。</p>
</script>
20 changes: 20 additions & 0 deletions nodes/config/locales/ja/ui_group.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ui-group": {
"label": {
"name": "名前",
"page": "ページ",
"size": "サイズ",
"display-name": "グループ名を表示",
"className": "クラス",
"classNamePlaceholder": "グループのための任意のCSSクラス名",
"defaultState": "標準状態",
"visibility": "画面表示",
"visible": "表示",
"hidden": "非表示",
"interactivity": "画面操作",
"active": "有効",
"disabled": "無効",
"openDashboardSidebar": "ダッシュボード2.0のサイドバーを開く"
}
}
}
26 changes: 13 additions & 13 deletions nodes/config/ui_group.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
height: '#node-config-input-height',
auto: false
})

// backwards compatibility
if (this.visible === undefined || this.visible === true) {
this.visible = true
Expand All @@ -54,7 +54,7 @@
} else {
this.visible = false
}

// convert string to boolean
const disabled = $('#node-config-input-disabled').val()
if (disabled === 'true') {
Expand All @@ -63,38 +63,38 @@
this.disabled = false
}
}
})
})
</script>

<script type="text/html" data-template-name="ui-group">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-bookmark"></i> Name</label>
<label for="node-config-input-name"><i class="fa fa-bookmark"></i> <span data-i18n="ui-group.label.name"></label>
<input type="text" id="node-config-input-name">
</div>
<div class="form-row">
<label for="node-config-input-page"><i class="fa fa-bookmark"></i> Page</label>
<label for="node-config-input-page"><i class="fa fa-bookmark"></i> <span data-i18n="ui-group.label.page"></label>
<input type="text" id="node-config-input-page">
</div>
<div class="form-row">
<label for="node-config-input-size"><i class="fa fa-arrows-h"></i> Size</label>
<label for="node-config-input-size"><i class="fa fa-arrows-h"></i> <span data-i18n="ui-group.label.size"></label>
<input type="hidden" id="node-config-input-width">
<input type="hidden" id="node-config-input-height">
<button class="editor-button" id="node-config-input-size"></button>
</div>
<div class="form-row">
<input style="margin:8px 0 10px 102px; width:20px;" type="checkbox" checked id="node-config-input-showTitle">
<label style="width:auto" for="node-config-input-showTitle"><span data-i18n="ui-group.display-name"></span></label>
<label style="width:auto" for="node-config-input-showTitle"><span data-i18n="ui-group.label.display-name"></span></label>
</div>
<div class="form-row" id="text-row-class">
<label for="node-config-input-className"><i class="fa fa-code"></i> Class</label>
<input type="text" id="node-config-input-className" placeholder="Optional CSS class name(s) for group"/>
<label for="node-config-input-className"><i class="fa fa-code"></i> <span data-i18n="ui-group.label.className"></span></label>
<input type="text" id="node-config-input-className" data-i18n="[placeholder]ui-group.label.classNamePlaceholder"/>
</div>
<div class="form-row" style="font-weight: 600;">
<i class="w-16 fa fa-eye"></i> Default State
<i class="w-16 fa fa-eye"></i> <span data-i18n="ui-group.label.defaultState"></span>
</div>
<div class="form-row">
<div style="display: flex; align-items: center; gap: 2px;">
<label for="node-config-input-visible" style="margin-bottom: 0">Visibility</label>
<label for="node-config-input-visible" style="margin-bottom: 0" data-i18n="ui-group.label.visibility"></label>
<select id="node-config-input-visible" style="width: 150px;">
<option value="true" data-i18n="ui-group.label.visible"></option>
<option value="false" data-i18n="ui-group.label.hidden"></option>
Expand All @@ -103,14 +103,14 @@
</div>
<div class="form-row">
<div style="display: flex; align-items: center; gap: 2px;">
<label for="node-config-input-disabled" style="margin-bottom: 0">Interactivity</label>
<label for="node-config-input-disabled" style="margin-bottom: 0" data-i18n="ui-group.label.interactivity"></label>
<select id="node-config-input-disabled" style="width: 150px;">
<option value="false" data-i18n="ui-group.label.active"></option>
<option value="true" data-i18n="ui-group.label.disabled"></option>
</select>
</div>
</div>
<div class="form-row">
<button onclick="RED.sidebar.show('dashboard-2.0')" class="editor-button editor-button-small">Open Dashboard 2.0 Sidebar</button>
<button onclick="RED.sidebar.show('dashboard-2.0')" class="editor-button editor-button-small" data-i18n="ui-group.label.openDashboardSidebar"></button>
</div>
</script>

0 comments on commit e869cfe

Please sign in to comment.