MagicMirrorOrg / MagicMirror

MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant.
http://magicmirror.builders
MIT License
19.76k stars 4.2k forks source link

[Proposal] Enhanced Translator #2659

Closed eouia closed 3 years ago

eouia commented 3 years ago

MagicMirror² Enhanced Translator

This project is rewriting the internal translator class of MagicMirror to have enhanced features.

Motivation

For several years, the current translator class works for L10N/I18N of MM successfully. But there is still some lack of features. Especially in the below cases, we need more improvements.

Those are the main reason why this project begins.

Improvements

.... moe details are here - https://github.com/MMRIZE/MagicMirror_EnhancedTranslator/blob/master/README.md

By the way, I haven't made this as a PR yet, because it will fail to pass the current test. For the test, MM's most parts would be running on the browser, why we need nodev12 test?

khassel commented 3 years ago

Link to forum discussion

rejas commented 3 years ago

Thats an impressive proposal :-) Having a more flexible translation gets a big plus from me!

Question: Would current translation files / module still work?

MichMich commented 3 years ago

Indeed. Super impressive. But as stated: it's important that it is a not breaking change.

eouia commented 3 years ago

For backward compatibility;

Changed;

With this patch, MM 2.16 with default core modules was successfully played. Not tested many 3rd party modules, but the All I test looks worked.

I rewrote the unit test and passed. but for the e2e test. I have no experience with that, so I failed to pass the e2e test. I have no idea how to adjust this e2e test suite for my patch.

eouia commented 3 years ago

@MichMich @rejas @khassel and all who have an interest in this proposal;

Even if this project might have the worth to be included in the mainstream of MM, It would be better to wait to MM 2.19(or 2.20?) - 2022 Apr., 6 months later.

So I'll close this issue at this moment, but I'll keep the progress in my own repository to wait in the meantime until next April. If you have any suggestions or discussions, leave them in my repository. I'll reopen this issue at the proper time.

https://github.com/MMRIZE/MagicMirror_EnhancedTranslator

Thanks.

MichMich commented 3 years ago

@eouia, I really appriciate your work on this. Indeed it might be a good idea to wait until Node's v12 EOL. My proposal is to merge it into develop directly after we released a new master that way we have 3 months to test the new setup before we need to release a new master.

I have no problem dropping the use of Moment.js in the MagicMirror² core if we have a good alternative. But we might want to keep moment.js part of the default dependencies for the 3rd party modules.

It might be a good idea to open an issue in this repo with info about your work, so there is one central place we can discuss planning, issues and features. But I leave that up to you if you want to.

Cheers! And thanks again for your awesome work.