Skip to content

Commit

Permalink
Merge pull request #5957 from formio/FIO-7954-fixed-translations
Browse files Browse the repository at this point in the history
FIO-7954: fixed translations
  • Loading branch information
brendanbond authored Jan 7, 2025
2 parents d30be67 + 2b25df2 commit a36bb25
Show file tree
Hide file tree
Showing 39 changed files with 414 additions and 261 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"homepage": "https://github.com/formio/formio.js#readme",
"dependencies": {
"@formio/bootstrap": "3.1.0-dev.1-dev.120.01bbe80",
"@formio/bootstrap": "v3.0.0-dev.121.085d187",
"@formio/choices.js": "^10.2.1",
"@formio/core": "v2.4.0-dev.210.e634ab4",
"@formio/text-mask-addons": "3.8.0-formio.4",
Expand Down
8 changes: 4 additions & 4 deletions src/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,11 @@ export default class Form extends Element {
*/
build() {
if (!this.instance) {
return Promise.reject('Form not ready. Use form.ready promise');
return Promise.reject(this.t('formNotReady'));
}

if (!this.element) {
return Promise.reject('No DOM element for form.');
return Promise.reject(this.t('noFormElement'));
}

// Add temporary loader.
Expand All @@ -463,7 +463,7 @@ export default class Form extends Element {

render() {
if (!this.instance) {
return Promise.reject('Form not ready. Use form.ready promise');
return Promise.reject(this.t('formNotReady'));
}
return Promise.resolve(this.instance.render())
.then((param) => {
Expand All @@ -474,7 +474,7 @@ export default class Form extends Element {

attach(element) {
if (!this.instance) {
return Promise.reject('Form not ready. Use form.ready promise');
return Promise.reject(this.t('formNotReady'));
}
if (this.element) {
delete this.element.component;
Expand Down
8 changes: 4 additions & 4 deletions src/PDFBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ export default class PDFBuilder extends WebformBuilder {
const progress = Math.floor((event.loaded / event.total) * 100);
this.refs.uploadProgress.style.width = `${progress}%`;
if (progress > 98) {
this.refs.uploadProgress.innerHTML = this.t('Converting PDF. Please wait.');
this.refs.uploadProgress.innerHTML = this.t('waitPdfConverting');
}
else {
this.refs.uploadProgress.innerHTML = `${this.t('Uploading')} ${progress}%`;
this.refs.uploadProgress.innerHTML = `${this.t('uploading')} ${progress}%`;
}
}
}, `${this.projectUrl}/upload`, {}, 'file')
Expand Down Expand Up @@ -263,7 +263,7 @@ export default class PDFBuilder extends WebformBuilder {
return;
}
this.refs.uploadError.style.display = message ? '' : 'none';
this.refs.uploadError.innerHTML = message;
this.refs.uploadError.innerHTML = this.t(`${message}`);
}

createForm(options) {
Expand Down Expand Up @@ -522,7 +522,7 @@ export default class PDFBuilder extends WebformBuilder {
name: 'showBuilderErrors',
data: {
compId: comp.component.id,
errorMessage: `API Key is not unique: ${comp.key}`,
errorMessage: `${this.t('notUniqueKey')}: ${comp.key}`,
}
});
}
Expand Down
Loading

0 comments on commit a36bb25

Please sign in to comment.