amitchone / MMM-birthdays

A birthday reminder module for MichMich's MagicMirror
Apache License 2.0
11 stars 3 forks source link

Other languages #2

Closed det-box closed 1 year ago

det-box commented 1 year ago

Hello, Thank you for this wonderful plugin. Please make it possible that it can be displayed in other languages. E.g.: German, incl. the headline many thanks

det-box commented 1 year ago

by the way notify_days_after is no longer supported I think it is a pity. e.g.: if I was on vacation and come back home, I could see which birthday I missed. There is still the calendar on the cell phone. Thanks

amitchone commented 1 year ago

Hey @det-box, you're welcome - thanks for taking the time to use it, I am glad that you find it useful!

Absolutely I can add other languages! It would be really helpful if you could tell me if my translations for the following phrases make sense in German (apologies, I am just using Google Translate...)

Birthdays: Geburtstage Adam will be 17 in 2 days: Adam wird in 2 Tagen 17 Adam will be 17 in 1 day: Adam wird in 1 Tag 17 sein Adam was 17 1 day ago: Adam war vor 1 Tag 17 Jahre alt Adam was 17 2 days ago: Adam war vor 2 Tagen 17 Adam is 17 today: Adam ist heute 17

If these all make sense then I can get the localisation working in German as a start and add more when requested by other people!

Apologies that I removed notify_days_after - it is relatively straight forward for me to add back in, so I shall re-add this separately to the other language support.

Thanks again for your feedback!

amitchone commented 1 year ago

@det-box How is this? You can test locally for yourself if you pull the branch feature/localisation and then add locale: "de_DE" to the config

Screenshot 2023-10-22 at 19 30 43
det-box commented 1 year ago

Hi, very nice that you continue, I would modify it like this, the rest as above. Adam wird heute 64 Adam wurde vor 2 Tagen 17 Adam wird heute 17

Thanks

det-box commented 1 year ago

{ "title": "GEBURTSTAGE", "phrase": { "u_m": "{NAME} wird in {DAYS} Tagen {AGE}", ({NAME} wird in 1 Tag {AGE}) "u_s": "{NAME} wird in {DAYS} Tagen {AGE} sein", ({NAME} wird in 1 Tag {AGE} sein) "p_m": "{NAME} wurde vor {DAYS} Tagen {AGE} Jahre alt", "p_s": "{NAME} wurde vor {DAYS} Tagen {AGE}", "t": "{NAME} wird heute {AGE}!" } }

if DAYS =1 then Tage=Tag

det-box commented 1 year ago

please correct README from: https://github.com/amitchone/MMM-birthdays.git to git clone https://github.com/amitchone/MMM-birthdays.git

Branch check out with: git clone -b feature/localisation https://github.com/amitchone/MMM-birthdays.git and an npm install in the folder MMM-birthdays German language works perfectly.

Thanks a lot

amitchone commented 1 year ago

So, would this make more sense?

{
    "title": "GEBURTSTAGE",
    "phrase": {
        "u_m": "{NAME} wird in {DAYS} Tagen {AGE}",             // Adam wird in 2 Tagen 30
        "u_s": "{NAME} wird in {DAYS} Tag {AGE} sein",          // Adam wird in 1 Tag 30 sein
        "p_m": "{NAME} wurde vor {DAYS} Tagen {AGE} Jahre alt", // Adam wurde vor 2 Tagen 30 Jahre alt
        "p_s": "{NAME} wurde vor {DAYS} Tag {AGE}",             // Adam wurde vor 1 Tag 30 
        "t": "{NAME} wird heute {AGE}!"                         // Adam wird heute 30!
    }
}

If so then I'll make this the final version of de_de.json and then merge the changes so you don't have to run from the feature branch

amitchone commented 1 year ago

Also, thanks for catching the typo in the README

det-box commented 1 year ago

The Problem is in german . If {DAYS} > 1 than { "title": "GEBURTSTAGE", "phrase": { "u_m": "{NAME} wird in {DAYS} Tagen {AGE}",
"u_s": "{NAME} wird in {DAYS} Tagen {AGE} sein",
"p_m": "{NAME} wurde vor {DAYS} Tagen {AGE} Jahre alt", "p_s": "{NAME} wurde vor {DAYS} Tagen {AGE}",
"t": "{NAME} wird heute {AGE}!"
} }

If {DAYS} = 1 than

{ "title": "GEBURTSTAGE", "phrase": { "u_m": "{NAME} wird in {DAYS} Tag {AGE}",
"u_s": "{NAME} wird in {DAYS} Tag {AGE} sein",
"p_m": "{NAME} wurde vor {DAYS} Tag {AGE} Jahre alt", "p_s": "{NAME} wurde vor {DAYS} Tag {AGE}",
"t": "{NAME} wird heute {AGE}!"
} } I think Check in this { "title": "GEBURTSTAGE", "phrase": { "u_m": "{NAME} wird in {DAYS} Tagen {AGE}",
"u_s": "{NAME} wird in {DAYS} Tagen {AGE} sein",
"p_m": "{NAME} wurde vor {DAYS} Tagen {AGE} Jahre alt", "p_s": "{NAME} wurde vor {DAYS} Tagen {AGE}",
"t": "{NAME} wird heute {AGE}!"
} }

amitchone commented 1 year ago

I think it will work then. The u_m and p_m properties are used when DAYS > 1 whilst the u_s and p_s properties are used when DAYS == 1.

The _mdenotes multiple days and then _s denotes a single day

MagicMikeMirror commented 1 year ago

So, would this make more sense?

{
    "title": "GEBURTSTAGE",
    "phrase": {
        "u_m": "{NAME} wird in {DAYS} Tagen {AGE}",             // Adam wird in 2 Tagen 30
        "u_s": "{NAME} wird in {DAYS} Tag {AGE} sein",          // Adam wird in 1 Tag 30 sein
        "p_m": "{NAME} wurde vor {DAYS} Tagen {AGE} Jahre alt", // Adam wurde vor 2 Tagen 30 Jahre alt
        "p_s": "{NAME} wurde vor {DAYS} Tag {AGE}",             // Adam wurde vor 1 Tag 30 
        "t": "{NAME} wird heute {AGE}!"                         // Adam wird heute 30!
    }
}

If so then I'll make this the final version of de_de.json and then merge the changes so you don't have to run from the feature branch

that would be great .. waiting for German language :) i'm a noob, so how do i get this ? i installed the module a few minutes ago. thank you

det-box commented 1 year ago

I think it will work then. The u_m and p_m properties are used when DAYS > 1 whilst the u_s and p_s properties are used when DAYS == 1.

The _mdenotes multiple days and then _s denotes a single day

Ahh ok Fine, then Check this in. _s =Tag -m=Tage

det-box commented 1 year ago

So, would this make more sense?

{
    "title": "GEBURTSTAGE",
    "phrase": {
        "u_m": "{NAME} wird in {DAYS} Tagen {AGE}",             // Adam wird in 2 Tagen 30
        "u_s": "{NAME} wird in {DAYS} Tag {AGE} sein",          // Adam wird in 1 Tag 30 sein
        "p_m": "{NAME} wurde vor {DAYS} Tagen {AGE} Jahre alt", // Adam wurde vor 2 Tagen 30 Jahre alt
        "p_s": "{NAME} wurde vor {DAYS} Tag {AGE}",             // Adam wurde vor 1 Tag 30 
        "t": "{NAME} wird heute {AGE}!"                         // Adam wird heute 30!
    }
}

If so then I'll make this the final version of de_de.json and then merge the changes so you don't have to run from the feature branch

that would be great .. waiting for German language :) i'm a noob, so how do i get this ? i installed the module a few minutes ago. thank you

You can use Branch check out with: git clone -b feature/localisation https://github.com/amitchone/MMM-birthdays.git Or waiting if is in Master Branch

amitchone commented 1 year ago

@det-box Thanks for your feedback on this - I hope this makes the module better for you to use! I will get to work on the notify_days_after feature again soon.

@MagicMikeMirror Thanks for getting in touch - I have just merged these new changes into main, so all you should need to do is git pull from within the MMM-birthdays directory and you should have the latest changes. The documentation in the README has been updated too to explain how to change languages. Let me know if you have any other questions.

Thank you all

MagicMikeMirror commented 1 year ago

@det-box Thanks for your feedback on this - I hope this makes the module better for you to use! I will get to work on the notify_days_after feature again soon.

@MagicMikeMirror Thanks for getting in touch - I have just merged these new changes into main, so all you should need to do is git pull from within the MMM-birthdays directory and you should have the latest changes. The documentation in the README has been updated too to explain how to change languages. Let me know if you have any other questions.

Thank you all

thank you so much !! working well ! not all heros wear capes !