Skip to content

Commit

Permalink
add localization
Browse files Browse the repository at this point in the history
  • Loading branch information
xsrf committed Apr 17, 2021
1 parent 90ebe69 commit 7882232
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
43 changes: 43 additions & 0 deletions extension/locale.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[en]
# Installed = Installed
# Available = Available
# Update available = Update available
# Toggle View = Toggle View
# Toggle PCB View between Top and Bottom = Toggle PCB View between Top and Bottom
# Flip on Layer = Flip on Layer
# Visit GitHub Page = Visit GitHub Page
# Flip view automatically for these Layers = Flip view automatically for these Layers
# Allows you to switch the PCB View between Top and Bottom View = Allows you to switch the PCB View between Top and Bottom View

[de]
Installed = Installiert
Available = Verfügbar
Update available = Update verfügbar
Toggle View = Ansicht umschalten
Toggle PCB View between Top and Bottom = PCB Ansicht von Oben/Unten umschalten
Flip on Layer = Lagen spiegeln
Visit GitHub Page = GitHub Seite öffnen
Flip view automatically for these Layers = Ansicht für diese Ebenen automatisch spiegeln
Allows you to switch the PCB View between Top and Bottom View = Ermöglicht das Umschalten der Ansicht von Oben oder Unten

[es]
# Installed = Installed
# Available = Available
# Update available = Update available
# Toggle View = Toggle View
# Toggle PCB View between Top and Bottom = Toggle PCB View between Top and Bottom
# Flip on Layer = Flip on Layer
Visit GitHub Page = Visita la página de GitHub
# Flip view automatically for these Layers = Flip view automatically for these Layers
# Allows you to switch the PCB View between Top and Bottom View = Allows you to switch the PCB View between Top and Bottom View

[zh-hans]
Installed = 已安装
Available = 可用
Update available = 可用更新
# Toggle View = Toggle View
# Toggle PCB View between Top and Bottom = Toggle PCB View between Top and Bottom
# Flip on Layer = Flip on Layer
Visit GitHub Page = 访问 Github 主页
# Flip view automatically for these Layers = Flip view automatically for these Layers
# Allows you to switch the PCB View between Top and Bottom View = Allows you to switch the PCB View between Top and Bottom View
12 changes: 6 additions & 6 deletions extension/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const DOMIdPrefix = extensionId + '-' + Math.random().toString(36).substr(2);

api('createToolbarButton', {
icon: api('getRes', { file: 'icon.svg' }),
title: 'Toggle PCB view',
title: 'Toggle View',
fordoctype: 'pcb,pcblib',
menu:[
{
text: "Toggle View",
text: 'Toggle View',
cmd: Helper.createCommand(()=>{toggle();}),
title: 'Toggle PCB View between Top and Bottom',
icon: api('getRes', { file: 'icon.svg' })
Expand All @@ -21,25 +21,25 @@ api('createToolbarButton', {
title: 'Flip view automatically for these Layers',
submenu: [
{
text: 'Bottom Copper',
text: 'BottomLayer',
group: 'checkbox:autoToggleLayer',
id: `${DOMIdPrefix}-layer-2`,
cmd: Helper.createCommand(()=>{saveConfig()})
},
{
text: 'Bottom Silk',
text: 'BottomSilkLayer',
group: 'checkbox:autoToggleLayer',
id: `${DOMIdPrefix}-layer-4`,
cmd: Helper.createCommand(()=>{saveConfig()})
},
{
text: 'Bottom Paste',
text: 'BottomPasteMaskLayer',
group: 'checkbox:autoToggleLayer',
id: `${DOMIdPrefix}-layer-6`,
cmd: Helper.createCommand(()=>{saveConfig()})
},
{
text: 'Bottom Mask',
text: 'BottomSolderMaskLayer',
group: 'checkbox:autoToggleLayer',
id: `${DOMIdPrefix}-layer-8`,
cmd: Helper.createCommand(()=>{saveConfig()})
Expand Down
3 changes: 2 additions & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "ToggleView",
"description": "Allows you to switch the PCB View between Top and Bottom View.",
"description": "Allows you to switch the PCB View between Top and Bottom View",
"version": "1.2",
"homepage": "https://github.com/xsrf/easyeda-toggleview",
"icons": {
"default": "icon.svg"
},
"locale": "locale.txt",
"scripts": [ "easyeda-helper.js", "main.js" ],
"updatebaseurl" : "https://raw.githubusercontent.com/xsrf/easyeda-toggleview/autoupdate/extension/"
}

0 comments on commit 7882232

Please sign in to comment.