Skip to content

Commit

Permalink
fix: add default value for fromLocale
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Dec 1, 2024
1 parent ca75e95 commit 089d7db
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/js/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/lang/en-US.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"en-US":"English","dir":"ltr","af-ZA":"Afrikaans (South Africa)","ar-TN":"Arabic (Tunisia)","cs-CZ":"Czech (Czechia)","de-DE":"German (Germany)","es-ES":"European Spanish","fa-IR":"Persian (Iran)","fi-FI":"Finnish (Finland)","fr-FR":"French (France)","hu-HU":"Hungarian (Hungary)","it-IT":"Italian (Italy)","ja-JP":"Japanese (Japan)","nb-NO":"Norwegian Bokmål (Norway)","pl-PL":"Polish (Poland)","pt-BR":"Brazilian Portuguese","pt-PT":"European Portuguese","ro-RO":"Romanian (Romania)","ru-RU":"Russian (Russia)","th-TH":"Thai (Thailand)","tr-TR":"Turkish (Türkiye)","zh-CN":"Chinese (China)","zh-HK":"Chinese (Hong Kong SAR China)","action.add.attrs.attr":"What attribute would you like to add?","action.add.attrs.value":"Default Value","addOption":"Add Option","allFieldsRemoved":"All fields were removed.","allowSelect":"Allow Select","and":"and","attribute":"Attribute","attributeNotPermitted":"Attribute \"{attribute}\" is not permitted, please choose another.","attributes":"Attributes","attrs.class":"Class","attrs.className":"Class","attrs.dir":"Direction","attrs.id":"Id","attrs.required":"Required","attrs.style":"Style","attrs.title":"Title","attrs.type":"Type","attrs.value":"Value","autocomplete":"Autocomplete","button":"Button","cannotBeEmpty":"This field cannot be empty","cannotClearFields":"There are no fields to clear","checkbox":"Checkbox","checkboxes":"Checkboxes","class":"Class","clear":"Clear","clearAllMessage":"Are you sure you want to clear all fields?","close":"Close","column":"Column","condition.target.placeholder":"target","condition.value.placeholder":"value","confirmClearAll":"Are you sure you want to remove all fields?","content":"Content","control":"Control","controlGroups.nextGroup":"Next Group","controlGroups.prevGroup":"Previous Group","controls.filteringTerm":"Filtering \"{term}\"","controls.form.button":"Button","controls.form.checkbox-group":"Checkbox Group","controls.form.input.date":"Date","controls.form.input.email":"Email","controls.form.input.file":"File Upload","controls.form.input.hidden":"Hidden Input","controls.form.input.number":"Number","controls.form.input.text":"Text Input","controls.form.radio-group":"Radio Group","controls.form.select":"Select","controls.form.textarea":"TextArea","controls.groups.form":"Form Fields","controls.groups.html":"HTML Elements","controls.groups.layout":"Layout","controls.html.divider":"Divider","controls.html.header":"Header","controls.html.paragraph":"Paragraph","controls.layout.column":"Column","controls.layout.row":"Row","copy":"Copy To Clipboard","danger":"Danger","defineColumnLayout":"Define a column layout","defineColumnWidths":"Define column widths","description":"Help Text","descriptionField":"Description","editing.row":"Editing Row","editorTitle":"Form Elements","field":"Field","field.property.invalid":"not valid","field.property.isChecked":"is checked","field.property.isNotVisible":"is not visible","field.property.isVisible":"is visible","field.property.label":"label","field.property.valid":"valid","field.property.value":"value","fieldNonEditable":"This field cannot be edited.","fieldRemoveWarning":"Are you sure you want to remove this field?","fileUpload":"File Upload","formUpdated":"Form Updated","getStarted":"Drag a field from the right to get started.","group":"Group","grouped":"Grouped","hidden":"Hidden Input","hide":"Edit","htmlElements":"HTML Elements","if":"If","condition.type.if":"If","condition.type.or":"Or","condition.type.then":"Then","condition.type.and":"And","if.condition.source.placeholder":"source","if.condition.target.placeholder":"target / value","info":"Info","input.date":"Date","input.text":"Text","label":"Label","labelCount":"{label} {count}","labelEmpty":"Field Label cannot be empty","lang.af":"Afrikaans","lang.ar":"Arabic","lang.cs":"Czech","lang.de":"German","lang.en":"English","lang.es":"Spanish","lang.fa":"Persian","lang.fi":"Finnish","lang.fr":"French","lang.hu":"Hungarian","lang.it":"Italian","lang.ja":"Japanese","lang.nb":"Norwegian Bokmål","lang.pl":"Polish","lang.pt":"Portuguese","lang.ro":"Romanian","lang.ru":"Russian","lang.th":"Thai","lang.tr":"Turkish","lang.zh":"Chinese","layout":"Layout","limitRole":"Limit access to one or more of the following roles:","mandatory":"Mandatory","maxlength":"Max Length","meta.group":"Group","meta.icon":"Ico","meta.label":"Label","minOptionMessage":"This field requires a minimum of 2 options","name":"Name","newOptionLabel":"New {type}","no":"No","number":"Number","off":"Off","on":"On","operator.contains":"contains","operator.equals":"equals","operator.notContains":"not contains","operator.notEquals":"not equal","operator.notVisible":"not visible","operator.visible":"visible","option":"Option","optional":"optional","optionEmpty":"Option value required","optionLabel":"Option {count}","options":"Options","or":"or","order":"Order","panel.label.attrs":"Attributes","panel.label.conditions":"Conditions","panel.label.config":"Configuration","panel.label.meta":"Meta","panel.label.options":"Options","panelEditButtons.attrs":"+ Attribute","panelEditButtons.conditions":"+ Condition","panelEditButtons.options":"+ Option","placeholder":"Placeholder","placeholder.className":"space separated classes","placeholder.email":"Enter you email","placeholder.label":"Label","placeholder.password":"Enter your password","placeholder.placeholder":"Placeholder","placeholder.text":"Enter some Text","placeholder.textarea":"Enter a lot of text","placeholder.value":"Value","preview":"Preview","primary":"Primary","remove":"Remove","removeMessage":"Remove Element","removeType":"Remove {type}","required":"Required","reset":"Reset","richText":"Rich Text Editor","roles":"Access","row":"Row","row.makeInputGroup":"Make this row an input group.","row.makeInputGroupDesc":"Input Groups enable users to add sets of inputs at a time.","row.settings.fieldsetWrap":"Wrap row in a <fieldset> tag","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset","save":"Save","secondary":"Secondary","select":"Select","selectColor":"Select Color","selectionsMessage":"Allow Multiple Selections","selectOptions":"Options","separator":"Separator","settings":"Settings","size":"Size","sizes":"Sizes","sizes.lg":"Large","sizes.m":"Default","sizes.sm":"Small","sizes.xs":"Extra Small","style":"Style","styles":"Styles","styles.btn":"Button Style","styles.btn.danger":"Danger","styles.btn.default":"Default","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning","subtype":"Type","success":"Success","text":"Text Field","then":"Then","then.condition.target.placeholder":"target","toggle":"Toggle","ungrouped":"Un-Grouped","warning":"Warning","yes":"Yes"}
{"en-US":"English","dir":"ltr","af-ZA":"Afrikaans (South Africa)","ar-TN":"Arabic (Tunisia)","cs-CZ":"Czech (Czechia)","de-DE":"German (Germany)","es-ES":"European Spanish","fa-IR":"Persian (Iran)","fi-FI":"Finnish (Finland)","fr-FR":"French (France)","hu-HU":"Hungarian (Hungary)","it-IT":"Italian (Italy)","ja-JP":"Japanese (Japan)","nb-NO":"Norwegian Bokmål (Norway)","pl-PL":"Polish (Poland)","pt-BR":"Brazilian Portuguese","pt-PT":"European Portuguese","ro-RO":"Romanian (Romania)","ru-RU":"Russian (Russia)","th-TH":"Thai (Thailand)","tr-TR":"Turkish (Türkiye)","zh-CN":"Chinese (China)","zh-HK":"Chinese (Hong Kong SAR China)","action.add.attrs.attr":"What attribute would you like to add?","action.add.attrs.value":"Default Value","addOption":"Add Option","allFieldsRemoved":"All fields were removed.","allowSelect":"Allow Select","and":"and","attribute":"Attribute","attributeNotPermitted":"Attribute \"{attribute}\" is not permitted, please choose another.","attributes":"Attributes","attrs.class":"Class","attrs.className":"Class","attrs.dir":"Direction","attrs.id":"Id","attrs.required":"Required","attrs.style":"Style","attrs.title":"Title","attrs.type":"Type","attrs.value":"Value","autocomplete":"Autocomplete","button":"Button","cannotBeEmpty":"This field cannot be empty","cannotClearFields":"There are no fields to clear","checkbox":"Checkbox","checkboxes":"Checkboxes","class":"Class","clear":"Clear","clearAllMessage":"Are you sure you want to clear all fields?","close":"Close","column":"Column","condition.target.placeholder":"target","condition.type.and":"And","condition.type.if":"If","condition.type.or":"Or","condition.type.then":"Then","condition.value.placeholder":"value","confirmClearAll":"Are you sure you want to remove all fields?","content":"Content","control":"Control","controlGroups.nextGroup":"Next Group","controlGroups.prevGroup":"Previous Group","controls.filteringTerm":"Filtering \"{term}\"","controls.form.button":"Button","controls.form.checkbox-group":"Checkbox Group","controls.form.input.date":"Date","controls.form.input.email":"Email","controls.form.input.file":"File Upload","controls.form.input.hidden":"Hidden Input","controls.form.input.number":"Number","controls.form.input.text":"Text Input","controls.form.radio-group":"Radio Group","controls.form.select":"Select","controls.form.textarea":"TextArea","controls.groups.form":"Form Fields","controls.groups.html":"HTML Elements","controls.groups.layout":"Layout","controls.html.divider":"Divider","controls.html.header":"Header","controls.html.paragraph":"Paragraph","controls.layout.column":"Column","controls.layout.row":"Row","copy":"Copy To Clipboard","danger":"Danger","defineColumnLayout":"Define a column layout","defineColumnWidths":"Define column widths","description":"Help Text","descriptionField":"Description","editing.row":"Editing Row","editorTitle":"Form Elements","field":"Field","field.property.invalid":"not valid","field.property.isChecked":"is checked","field.property.isNotVisible":"is not visible","field.property.isVisible":"is visible","field.property.label":"label","field.property.valid":"valid","field.property.value":"value","fieldNonEditable":"This field cannot be edited.","fieldRemoveWarning":"Are you sure you want to remove this field?","fileUpload":"File Upload","formUpdated":"Form Updated","getStarted":"Drag a field from the right to get started.","group":"Group","grouped":"Grouped","hidden":"Hidden Input","hide":"Edit","htmlElements":"HTML Elements","if":"If","if.condition.source.placeholder":"source","if.condition.target.placeholder":"target / value","info":"Info","input.date":"Date","input.text":"Text","label":"Label","labelCount":"{label} {count}","labelEmpty":"Field Label cannot be empty","lang.af":"Afrikaans","lang.ar":"Arabic","lang.cs":"Czech","lang.de":"German","lang.en":"English","lang.es":"Spanish","lang.fa":"Persian","lang.fi":"Finnish","lang.fr":"French","lang.hu":"Hungarian","lang.it":"Italian","lang.ja":"Japanese","lang.nb":"Norwegian Bokmål","lang.pl":"Polish","lang.pt":"Portuguese","lang.ro":"Romanian","lang.ru":"Russian","lang.th":"Thai","lang.tr":"Turkish","lang.zh":"Chinese","layout":"Layout","limitRole":"Limit access to one or more of the following roles:","mandatory":"Mandatory","maxlength":"Max Length","meta.group":"Group","meta.icon":"Ico","meta.label":"Label","minOptionMessage":"This field requires a minimum of 2 options","name":"Name","newOptionLabel":"New {type}","no":"No","number":"Number","off":"Off","on":"On","operator.contains":"contains","operator.equals":"equals","operator.notContains":"not contains","operator.notEquals":"not equal","operator.notVisible":"not visible","operator.visible":"visible","option":"Option","optional":"optional","optionEmpty":"Option value required","optionLabel":"Option {count}","options":"Options","or":"or","order":"Order","panel.label.attrs":"Attributes","panel.label.conditions":"Conditions","panel.label.config":"Configuration","panel.label.meta":"Meta","panel.label.options":"Options","panelEditButtons.attrs":"+ Attribute","panelEditButtons.conditions":"+ Condition","panelEditButtons.options":"+ Option","placeholder":"Placeholder","placeholder.className":"space separated classes","placeholder.email":"Enter you email","placeholder.label":"Label","placeholder.password":"Enter your password","placeholder.placeholder":"Placeholder","placeholder.text":"Enter some Text","placeholder.textarea":"Enter a lot of text","placeholder.value":"Value","preview":"Preview","primary":"Primary","remove":"Remove","removeMessage":"Remove Element","removeType":"Remove {type}","required":"Required","reset":"Reset","richText":"Rich Text Editor","roles":"Access","row":"Row","row.makeInputGroup":"Make this row an input group.","row.makeInputGroupDesc":"Input Groups enable users to add sets of inputs at a time.","row.settings.fieldsetWrap":"Wrap row in a <fieldset> tag","row.settings.fieldsetWrap.aria":"Wrap Row in Fieldset","save":"Save","secondary":"Secondary","select":"Select","selectColor":"Select Color","selectionsMessage":"Allow Multiple Selections","selectOptions":"Options","separator":"Separator","settings":"Settings","size":"Size","sizes":"Sizes","sizes.lg":"Large","sizes.m":"Default","sizes.sm":"Small","sizes.xs":"Extra Small","style":"Style","styles":"Styles","styles.btn":"Button Style","styles.btn.danger":"Danger","styles.btn.default":"Default","styles.btn.info":"Info","styles.btn.primary":"Primary","styles.btn.success":"Success","styles.btn.warning":"Warning","subtype":"Type","success":"Success","text":"Text Field","then":"Then","then.condition.target.placeholder":"target","toggle":"Toggle","ungrouped":"Un-Grouped","warning":"Warning","yes":"Yes"}
8 changes: 4 additions & 4 deletions src/lang/en-US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ clearAllMessage = Are you sure you want to clear all fields?
close = Close
column = Column
condition.target.placeholder = target
condition.type.and = And
condition.type.if = If
condition.type.or = Or
condition.type.then = Then
condition.value.placeholder = value
confirmClearAll = Are you sure you want to remove all fields?
content = Content
Expand Down Expand Up @@ -108,10 +112,6 @@ hidden = Hidden Input
hide = Edit
htmlElements = HTML Elements
if = If
condition.type.if = If
condition.type.or = Or
condition.type.then = Then
condition.type.and = And
if.condition.source.placeholder = source
if.condition.target.placeholder = target / value
info = Info
Expand Down
1 change: 1 addition & 0 deletions tools/index.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Processed languages files.
*/

export const languageFileMap = <%= languageFileMap %>
export const languageFiles = <%= languageFiles %>
export const languageFileOptions = <%= languageFileOptions %>
Expand Down
2 changes: 1 addition & 1 deletion tools/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const __dirname = fileURLToPath(new URL('.', import.meta.url))

// Command line arguments
const getDefaultToLocale = fromLocale => Object.keys(languageFileMap).filter(locale => locale !== fromLocale)
const [fromLocale, toLocaleArg = getDefaultToLocale(fromLocale)] = process.argv.slice(2)
const [fromLocale = 'en-US', toLocaleArg = getDefaultToLocale(fromLocale)] = process.argv.slice(2)
const toLocales = Array.isArray(toLocaleArg) ? toLocaleArg : [toLocaleArg]

// Configuration
Expand Down

0 comments on commit 089d7db

Please sign in to comment.