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

Multilanguage interface for tasmocompiler #40

Closed
bovirus opened this issue Apr 18, 2020 · 16 comments
Closed

Multilanguage interface for tasmocompiler #40

bovirus opened this issue Apr 18, 2020 · 16 comments
Labels
enhancement New feature or request

Comments

@bovirus
Copy link
Contributor

bovirus commented Apr 18, 2020

Could be possible to have a multi-language interface for the online compiler?

If you move all strings used in an external file I can help to translate in other language (ex. Italian)

Thanks. KR.

@benzino77
Copy link
Owner

It's gonna be a challenge... but I think it is doable. I will think about it.

@bovirus
Copy link
Contributor Author

bovirus commented Apr 18, 2020

@benizno77

Please take care that is just "nice o have".

But if you can and don't require so big changes why not.

Of course if it require a lot of job please post in "nice to have" priority.

I believe that the other request "Use personal fork of tasmota firmware for compilation" could be more interesting.

Thanks.

@bovirus bovirus changed the title Multilanguage interface Multilanguage interface for tasmocompiler Apr 18, 2020
@benzino77 benzino77 added the enhancement New feature or request label Apr 18, 2020
@rapejim
Copy link
Contributor

rapejim commented May 2, 2020

It's a very good idea, I can try to help you with Spanish translation, 😜

We can try it with i18next library and react-i18next (React implementation of i18next library), for example.

@benzino77
Copy link
Owner

That's true. I have no time to have a look in it a little bit deeper... But PRs are welcome ;)

@rapejim
Copy link
Contributor

rapejim commented May 2, 2020

That's true. I have no time to have a look in it a little bit deeper... But PRs are welcome ;)

I'll try it, but I'm not sure I'll make it, I've never programmed with NodeJS and React before... xD

@rapejim
Copy link
Contributor

rapejim commented May 3, 2020

@benzino77 I'm finally doing the translation with the integration of the "react-intl" library.
And the web change the language detecting the browser settings, 😜.
All translations messages are in json separated files, en.json, es.json, ...

When I finish translating the texts into Spanish I do the PR so that @bovirus can translate the texts into Italian in the it.json

image

image

@benzino77
Copy link
Owner

Looks very promising! I'm waiting for a PR to review.

@bovirus
Copy link
Contributor Author

bovirus commented May 4, 2020

@rapejim
@benzino77

Please consider if you can to modify the source to move the two parameters

web address of tasmota repository
default language for firmware build

in a separate file (ex. settings.json)

Could be usefull for example when I want as I did make a fork of tasmocompielr repository to use for tasmota firmware my personal fork of tasmota repository and as default language for firmware a different language than English (for me is Italian).

Thanks.

@benzino77
Copy link
Owner

It was created to compile vanilla Tasmota code. If you want to compile your own fork of Tasmota then you have to follow the ADVANCED guide.
There are also no obstacles to use your own fork of Tasmocompiler with all changes you need in place (pointing to the fork of Tasmota itself and with default language you prefer).
There are only five steps. It is meant to be as simple as possible, without overloading interface with too many options to choose. That's why I do think that @rapejim approach to discover browser language settings is very decent solution.

There is a feature request #38 to allow save configuration to file and then reload it which, in some sense, can address your needs.

@bovirus
Copy link
Contributor Author

bovirus commented May 4, 2020

#benzino77

Currently to the job that I explained (test GUI functionality with separate tasmta fork) I have to change the file of source code.
For a clear and better handling my proposal is to move the only two settings regarding your project

  • link to tasmota repository
  • default language for firmware build

in a specific resource file (settings)

Please take care that I didn't ask another option.
just ask if someone could do it (I don't have the knowledge to di it myself) to change the source code to have the the two parameters (link to repository/default language for firmware) in a single separate file.

For me It means to have a code more clear and simple to change (in the part that can be changed).
You can a fork of your project and change only repository link and default language in settings file without touch the rest of the code.

Thanks.

@benzino77
Copy link
Owner

in a specific resource file (settings)

it is already in special config file which is called: config.js and i located here: https://github.com/benzino77/tasmocompiler/blob/master/server/config/config.js

@bovirus
Copy link
Contributor Author

bovirus commented May 4, 2020

@benzino77 no

There are two times settings tasmota github repository in these files

file /server/config/config.js
file /Dockerfile

And in /server/config/config.js is not defined the default language GUI for build.

The idea a could be a source code change where all settings are in

/server/config/config.js

File /Dockerfilr read the settings of tasmota github address in /server/config/config.js

and src/component/AppStepper/VersioneStepper/Variables/Languages.js set default language for build based on default language stored in

/server/config/config.js

@rapejim
Copy link
Contributor

rapejim commented May 4, 2020

@rapejim
@benzino77

Please consider if you can to modify the source to move the two parameters

web address of tasmota repository
default language for firmware build

in a separate file (ex. settings.json)

Could be usefull for example when I want as I did make a fork of tasmocompielr repository to use for tasmota firmware my personal fork of tasmota repository and as default language for firmware a different language than English (for me is Italian).

Thanks.

One thing is to translate the interface to different languages (the subject of this issue), another thing is to pre-select the default language for the firmware (which I'm trying to include in the final PR) and finally the request to be able to change the repository to use Tasmota (not about this issue/enhancement).

@rapejim
Copy link
Contributor

rapejim commented May 4, 2020

@bovirus I have added auto-selection of the firmware language based on the user's web browser (independently of the languages supported by the Web UI) on Pull Request.

For example, now only english, spanish and italian are supported for web ui (you can help with /src/locales/it.json translations 😜). If you have your browser cofigured on French, the Web UI don't have support and use the default English for UI, but when you go to Version Step, you have pre-selected French, 👏

One problem solved!!

@bovirus
Copy link
Contributor Author

bovirus commented May 5, 2020

@rapejim

Many thanks for your help & change about source code.

Small OT. I saw that you have a big knowledge about development.
Could you help me please about Python source code?

@benzino77
Copy link
Owner

Addressed in #50

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

3 participants