Skip to content

Commit

Permalink
Button localization (#19)
Browse files Browse the repository at this point in the history
* update to new and open

* bump version

* added localization to main sidebar buttons

* version bump
  • Loading branch information
dnenov authored May 14, 2024
1 parent 8039173 commit f86a874
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dynamods/dynamo-home",
"version": "1.0.10",
"version": "1.0.11",
"description": "Dynamo Home",
"author": "Autodesk Inc.",
"main": "index.js",
Expand Down
14 changes: 7 additions & 7 deletions src/components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export function Sidebar({ onItemSelect, selectedSidebarItem })
id="openDropdown"
selectedValue={selectedFile}
onSelect={setSelectedFile}
placeholder="Open"
placeholder={<FormattedMessage id="button.title.text.open" />}
onSelectionChange={setSelectedValue}
options={[
{ label: 'Open File', value: 'open-file' },
{ label: 'Open Template', value: 'open-template' },
{ label: 'Backup Locations', value: 'open-backup-locations' }
{ label: <FormattedMessage id="button.title.text.open.file" />, value: 'open-file' },
{ label: <FormattedMessage id="button.title.text.open.template" />, value: 'open-template' },
{ label: <FormattedMessage id="button.title.text.backup.locations" />, value: 'open-backup-locations' }
]}
/>

Expand All @@ -43,11 +43,11 @@ export function Sidebar({ onItemSelect, selectedSidebarItem })
id="newDropdown"
selectedValue={selectedNew}
onSelect={setSelectedNew}
placeholder="New"
placeholder={<FormattedMessage id="button.title.text.new" />}
onSelectionChange={setSelectedValue}
options={[
{ label: 'Workspace', value: 'workspace' },
{ label: 'Custom Node', value: 'custom-node' }
{ label: <FormattedMessage id="button.title.text.workspace" />, value: 'workspace' },
{ label: <FormattedMessage id="button.title.text.custom.node" />, value: 'custom-node' }
]}
/>

Expand Down
7 changes: 7 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"button.title.text.new": "New",
"button.title.text.open": "Open",
"button.title.text.open.file": "Open File",
"button.title.text.open.template": "Open Template",
"button.title.text.backup.locations": "Backup Locations",
"button.title.text.workspace": "Workspace",
"button.title.text.custom.node": "Custom Node",
"title.text.recent": "Recent",
"title.text.samples": "Samples",
"title.text.learning": "Learning",
Expand Down

0 comments on commit f86a874

Please sign in to comment.