Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions about translation #91

Closed
niulinlnc opened this issue Nov 27, 2020 · 5 comments
Closed

Some questions about translation #91

niulinlnc opened this issue Nov 27, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@niulinlnc
Copy link

niulinlnc commented Nov 27, 2020

Some questions about translation:

  1. Now if there is only the default language (English), the language switch button will always be displayed on the form builder, it making the interface not simple enough.My desired result is that I can decide to display the language switch button or not to display the language switch button when designing the form.
  2. Options ['language'] = language.replace('_', '-') this will cause option {'i18n': {'zh_CN': {'name2': '姓名'}, 'readOnly': True, 'language': 'zh-CN '} where the zh_CN shown in i180n is different from the zh-CN shown in language, so the default translation package will not take effect.
@niulinlnc
Copy link
Author

About the second question, should all i18n[trans.lang_id.iso_code] be changed to i18n[trans.lang_id.iso_code.replace ('_', '-')]?

@bobslee bobslee assigned bobslee and unassigned bobslee Nov 27, 2020
@bobslee
Copy link
Member

bobslee commented Nov 27, 2020

@niulinlnc Indeed, I already had your experience with 1 useless language button.
Which appeared after my latest changes (last week).

Of course I would like to improve and solve this issue. I hope it can wait a few more days.

@bobslee bobslee added the enhancement New feature or request label Nov 27, 2020
@bobslee bobslee added this to the Milestone 1 milestone Nov 27, 2020
bobslee added a commit that referenced this issue Dec 3, 2020
Which was just a silly idea, for a reason (other bug?) I don't know anymore.
Addresses #91.
bobslee added a commit that referenced this issue Dec 3, 2020
Which was just a silly idea, for a reason (other bug?) I don't know anymore.
Addresses #91.
@bobslee
Copy link
Member

bobslee commented Dec 9, 2020

@niulinlnc I think I solved this implementation. Shall push very soon (within hours).

@bobslee
Copy link
Member

bobslee commented Dec 9, 2020

@niulinlnc Please download and replace formio with version 8.1
Should be fixed now.
Let me know or close the issue :)

bobslee added a commit that referenced this issue Dec 9, 2020
…orm Builder and Forms.

- Replace iso_code by code (e.g. nl now nl_NL).
- Add field "English Enable" on Form Builder, if English is installed
  this shows the English language button, even if no translations (so
- Formio defaults).

Concerns #91, #93
bobslee added a commit that referenced this issue Dec 9, 2020
…orm Builder and Forms.

- Replace iso_code by code (e.g. nl now nl_NL).
- Add field "English Enable" on Form Builder, if English is installed
  this shows the English language button, even if no translations (so
- Formio defaults).

Concerns #91, #93
bobslee added a commit that referenced this issue Dec 9, 2020
…orm Builder and Forms.

- Replace iso_code by code (e.g. nl now nl_NL).
- Add field "English Enable" on Form Builder, if English is installed
  this shows the English language button, even if no translations (so
- Formio defaults).

Concerns #91, #93
@bobslee
Copy link
Member

bobslee commented Dec 9, 2020

@niulinlnc Please download and update to version 8.2 (formio).
I resolved and improved some issues with the language switcher (buttons) and also translations should work now.
I tested thoroughly, so I'm curious whether it works with you.

bobslee added a commit that referenced this issue Dec 15, 2020
…orm Builder and Forms.

Convert the Odoo language code (underscore "_") to Formio JS/i18n
expected IETF code (hyphen "-").

Concerns #91, #93.
bobslee added a commit that referenced this issue Dec 15, 2020
…orm Builder and Forms.

Convert the Odoo language code (underscore "_") to Formio JS/i18n
expected IETF code (hyphen "-").

Concerns #91, #93.
bobslee added a commit that referenced this issue Dec 15, 2020
…orm Builder and Forms.

Convert the Odoo language code (underscore "_") to Formio JS/i18n
expected IETF code (hyphen "-").

Concerns #91, #93.
bobslee added a commit that referenced this issue Dec 15, 2020
…anslations in Form Builder and Forms).

Concerns #91, #93, #95
bobslee added a commit that referenced this issue Dec 15, 2020
…anslations in Form Builder and Forms).

Concerns #91, #93, #95
bobslee added a commit that referenced this issue Dec 15, 2020
…anslations in Form Builder and Forms).

Concerns #91, #93, #95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants