etcher
etcher copied to clipboard
minor: make i18n support and Chinese translation
Add the long-wanted i18n support using i18next, fixed #308 and fixed #3692. Tested on macOS 12 and it's been running fluently.
Example (zh-CN on macOS):

It works generally fine and has support for more languages, as shown in this markdown.
However, there are few problems:
-
I cannot find the method to change several "cancel" buttons' captain text.

-
When flashing/finished, a webview is shown and I cannot change that.

I sincerely hope that my pull request can be merged.
An error occurred whilst building your landr site preview:
{
"name": "Error",
"message": "Command failed with code undefined: /usr/src/app/node_modules/gatsby/cli.js build",
"stack": "Error: Command failed with code undefined: /usr/src/app/node_modules/gatsby/cli.js build\n at Object.exports.run (/usr/src/app/lib/build-runner.js:257:11)\n at async build (/usr/src/app/bot/index.js:132:19)\n at async /usr/src/app/bot/index.js:210:25\n at async Promise.all (index 0)\n at async middleware (/usr/src/app/node_modules/@octokit/webhooks/dist-node/index.js:355:5)"
}
@mcraa @lurch I don't understand why landrbot and versionbot failed?? The error message is hard to be understood.
Thanks, nice work @RoderickQiu
why the check fails is described here and here, the change-type is missing.
starting with for eg. patch: instead of feat: or adding Change-Type: patch at the end should do the trick.
@RoderickQiu Whilst I still occasionally comment on some of the issues, I no longer have anything to do with the Etcher project :slightly_smiling_face: But having worked on other localisation projects before, this indeed looks like impressive work!
Translations should have all been corrected. I'm going to sleep now. Things for tomorrow~
However, on last commit, it says ResinCI/electron failed but the log kept
And I don't know what happened. On my mac it works flawlessly.
Yeah unfortunately I believe the ResinCI logs are only viewable by Balena employees? :shrug: ("Resin" is what "Balena" used to be called https://www.balena.io/blog/resin-io-changes-name-to-balena-releases-open-source-edition/ ).
Yeah unfortunately I believe the ResinCI logs are only viewable by Balena employees? 🤷 ("Resin" is what "Balena" used to be called https://www.balena.io/blog/resin-io-changes-name-to-balena-releases-open-source-edition/ ).
Ahh...So how can I contact a balena employee? Those public members of balena github team doesn't seem to be connected with etcher project?? Could you help @mcraa you seems like an active maintainer, thanks.
Don't worry @RoderickQiu
the CI is not that reliable sometimes the upload fails after a successful build sometimes the worker does not start.
but this time it is not the CI's fault, something is missing in the new feature,
all platforms failed during running the test-gui script.
TypeError: Cannot read property 'use' of undefined
at Object.<anonymous> ([...]/lib/gui/app/i18n.ts:23:9)
at Object.<anonymous> ([...]/lib/gui/app/i18n.ts:39:3)
I hope you can reproduce it, otherwise I will have a look later.
Don't worry @RoderickQiu
the CI is not that reliable sometimes the upload fails after a successful build sometimes the worker does not start. but this time it is not the CI's fault, something is missing in the new feature, all platforms failed during running the
test-guiscript.TypeError: Cannot read property 'use' of undefined at Object.<anonymous> ([...]/lib/gui/app/i18n.ts:23:9) at Object.<anonymous> ([...]/lib/gui/app/i18n.ts:39:3)I hope you can reproduce it, otherwise I will have a look later.
Oh yeah I ran that script and it showed that type-error. This problem really seems weird, might be a problem of i18next or the CI itself??
But surprisingly, by changing all the import i18next from 'i18next;' (which was suggested by i18next) to import * as i18next from 'i18next'; the test is now working (the app itself works both before and after the change), although I really don't know why is that. Could you explain that?? (I've never used mocha myself, so it might be hard for me to understand it at first, really..)
However, as the test script itself is not i18n-ed now, some asserts are failing. But I'm sure that could be solved soon.
Yay so before this minor commit everything was already fine and will surely be after it~ Just very good.
Awww :slightly_frowning_face:

The build was ok, just the upload failed at the end.
The build was ok, just the upload failed at the end.
So what can I do? Or can you perform a retest @mcraa ? Thanks. A minor change like this shouldn't break anything.
Yes @RoderickQiu, we will run it again
Hello, any update on this? Does it means that I should push a blank commit to let it mergeable again?
No @RoderickQiu, you are good. Even if the CI succeeds I want to run your changes locally, which I haven't had time for yet.
@balena-ci test
Hello, any update on this? Just asking.
Hi, sorry for this taking so long. Quite some stuff slipped to the priority list before this. I can assure you it is not forgotten.
Hi, sorry for this taking so long. Quite some stuff slipped to the priority list before this. I can assure you it is not forgotten.
@mcraa @builder555 @zwhitchcox any of you folks have any bandwidth to get this over the line? Looks like an extremely valuable contribution...
Hello, any update on this? Just asking.
@RoderickQiu hello, thanks for you patience. Could you please rebase on master and resolve a couple of conflicts to get this over the line.
Hello, glad to see some conversation again. However, I've been quite busy lately and I hope I can be freer next week to do some stuff.
OK, I finally remembered to finish the conflict resolve task! @mcraa @ab77
Currently, the new CI does not work well with PRs from external repos (security reasons). ab77 is working on it, to enable great contributions like this one. If it is not fixed soon, I will merge it to a temporary branch then the CI should merge it to master.
Currently, the new CI does not work well with PRs from external repos (security reasons). ab77 is working on it, to enable great contributions like this one. If it is not fixed soon, I will merge it to a temporary branch then the CI should merge it to master.
@mcraa you should go ahead and do that anyway as external contributor flow may take a while (it's not trivial).
@mcraa external contributor support has shipped, so @RoderickQiu can now rebase, resolve conflicts and hopefully push one last time.
@mcraa external contributor support has shipped, so @RoderickQiu can now rebase, resolve conflicts and hopefully push one last time.
OK, but sadly I just directly went forward for a merge... And of course it failed and it seems that I cannot revert it...
@mcraa external contributor support has shipped, so @RoderickQiu can now rebase, resolve conflicts and hopefully push one last time.
OK, but sadly I just directly went forward for a merge... And of course it failed and it seems that I cannot revert it...
Please rebase on master. there shouldn't be any modifications of files under .github/ in this PR.
Sorry for my delay, but I've never done a rebase and failed to do this on the master. I had a second try just for now. After a unsuccessful attempt which again turned out to be a merge, I finally realized the way to make a rebase. However, after the rebase it seems that every commit come to co-assign with my name... Is that normal to have this?
Please, have a look at https://github.com/RoderickQiu/etcher/tree/i18n-conflict-resolve-2 and if it's satisfying, I will open a new pull request base on that branch. Or if I am messing up things, please tell me because I've never done that. @ab77
Replaced by https://github.com/balena-io/etcher/pull/3936