MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    [Proposal] Enhanced Translator

    Scheduled Pinned Locked Moved Feature Requests
    10 Posts 4 Posters 961 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BKeyportB Offline
      BKeyport Module Developer
      last edited by

      I love this idea! Could we include other localization as well, such as week start (Sunday start, Monday Start, Saturday start), etc.

      The "E" in "Javascript" stands for "Easy"

      M 1 Reply Last reply Reply Quote 1
      • M Offline
        MMRIZE @BKeyport
        last edited by MMRIZE

        @bkeyport
        Thanks.
        Intl spec is not completed yet perfectly. weekData by locale is STAGE3 now, waiting for STAGE4(release). It has not been implemented in all environments at this moment. (But V8 has that feature with --harmony_intl_locale_info. In the case of Chrome, it’s in developer trial, shipped since Chrome92. It will be released publicly soon.)

        Anyway, it will be used like this after public release;

        let he = new Intl.Locale("he")
        he.weekInfo
        // {firstDay: 7, weekendStart: 5, weekendEnd: 6, minimalDays: 1}
        
        let enGB = new Intl.Locale("en-GB")
        enGB.weekInfo
        // {firstDay: 1, weekendStart: 6, weekendEnd: 7, minimalDays: 4}
        

        At that time, we can use this feature for our Translator or calendar module also. We can deprecate momentJS or other dependencies.

        karsten13K BKeyportB 2 Replies Last reply Reply Quote 0
        • karsten13K Offline
          karsten13 @MMRIZE
          last edited by

          @mmrize I see no reason why it should not be a part of the core project.

          But I don’t know if @MichMich is very present here, I tagged him now so he will hopefully read this thread because he has to decide if he wants it in the core project.

          The e2e tests are a mess and there is already an issue to replace them (or at least a part of them).

          S M 2 Replies Last reply Reply Quote 0
          • BKeyportB Offline
            BKeyport Module Developer @MMRIZE
            last edited by

            @mmrize So, let me get this straight, we’re getting international support within vanilla JS?

            The "E" in "Javascript" stands for "Easy"

            M 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @karsten13
              last edited by

              @karsten13 someone would need to submit a PR for him to consider

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • M Offline
                MMRIZE @BKeyport
                last edited by MMRIZE

                @bkeyport said in [Proposal] Enhanced Translator:

                So, let me get this straight, we’re getting international support within vanilla JS?

                Well, it’s not about a matter of using Vanilla JS or not. But briefly answered, “possible”.
                The main point of this project is;
                “Give more freedom to the translation providers and Reduce the burden from the module developers.”
                This will not become the alternative of “momentJS”. The main algorithm for WHAT TO SHOW still should be done in the module. But the translation provider could have more freedom for HOW TO SHOW under specific language and locale.

                BKeyportB 1 Reply Last reply Reply Quote 0
                • M Offline
                  MMRIZE @karsten13
                  last edited by

                  @karsten13
                  I’ll make a PR in a few days. I just need some assurances. :)

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @MMRIZE
                    last edited by

                    @mmrize there are no ‘assurances’

                    the team will review the submission.
                    may ask for changes, may reject it.

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • BKeyportB Offline
                      BKeyport Module Developer @MMRIZE
                      last edited by

                      @mmrize Gotcha. Cool.

                      The "E" in "Javascript" stands for "Easy"

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy