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

[Translation tool] mn #2556

Closed
lucifer-crybaby opened this issue Mar 2, 2022 · 10 comments · Fixed by #2557
Closed

[Translation tool] mn #2556

lucifer-crybaby opened this issue Mar 2, 2022 · 10 comments · Fixed by #2557
Assignees
Labels
translation Rely to internationalization
Milestone

Comments

@lucifer-crybaby
Copy link

lucifer-crybaby commented Mar 2, 2022

Additional fixes

1 week ago => 1 долоо хоногийн өмнө
2 week ago => 2 долоо хоногийн өмнө
3 week ago => 3 долоо хоногийн өмнө
like "хоногийн"(correct way) not "хоногн"(this is current and wrong way)

@kylekatarnls
Copy link
Collaborator

Hello, thanks for the report. 🙏

I checked and there are few other mistake with short units I think.

Could you please check the MnMnTest.php file here:
https://github.com/briannesbitt/Carbon/pull/2557/files#diff-bc94fa036cbd4a28cadb2fdba11aa0f05008d1d43a691979610b4f921f88392b

And verify that green lines are not worse than red lines.

Thanks.

@kylekatarnls kylekatarnls added the translation Rely to internationalization label Mar 2, 2022
@kylekatarnls kylekatarnls added this to the 2.58.0 milestone Mar 2, 2022
@lucifer-crybaby
Copy link
Author

Yeah, sure. All looks good except on 213th line neither of green and red lines are correct the more proper way would be '2 жил 3 сар 1 хоног 1 с/секундын өмнө'

@kylekatarnls
Copy link
Collaborator

I struggle with this one, it will be a bit more tricky. I will first merge this to get improvement on the other lines then keep an other issue open for the multi-units string.

@lucifer-crybaby
Copy link
Author

Okay How can i help ?

@kylekatarnls
Copy link
Collaborator

Hello, I will work today on a system to say "declension only applies to the last part of a sequence of units". (#2565)

It sounds like in Mongolian, it would apply to all: ago/from_now/before/after. Can you confirm that?

Also there is this comment in the translations file:

Does it required to make translation for before, after as follows? hmm, I think we've made it with ago and from now keywords already. Anyway, I've included it just in case of undesired action...

I just wonder if the subtilty between both is clear enough:

  • ago and from_now are respectively past and future, they're absolute (always relative to "now")
  • before and after are relative to any other date (2 days before next Christmas for instance)

Can you check the declensions are all good for the 4 time conditions?
https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Lang/mn.php

@lucifer-crybaby
Copy link
Author

Hello, first of all thank you for what you are doing.

  1. I think that from line 32 to 45 are little off cuz some short units got full unit translations(e.g. line 33) for Mongolian and some got short unit translations(e.g. 41) and got no whitespace.

  2. ago, from now, after, and before are like this:

    ago and before are both means past and they also translates the same like:

    ago

    • Boy ate an apple 'five minutes ago'. => Хүү '5 минутын өмнө' алим идсэн.

    before

    • Boy never ate an apple 'before'. => Хүү 'өмнө' нь алим идэж байгаагүй
    • '5 minutes before' boy ate an apple something happened. => Хүү алим идэхээс '5 минутын өмнө' ямар нэгэн зүйл болсон.
    • Boy already ate an apple 'before' even I arrived. => Хүү намайг ирэхээс 'өмнө' аль хэдийн алим идсэн.
      ... so on.

    after and from now are both means future and they also translates the same like:

    after

    • Boy will eat an apple 'after 5 minutes'. => Хүү '5 минутын дараа' алим идэх болно.

    from now

    • Boy will eat an apple '5 minutes from now'. => Хүү 'одооноос 5 минутын дараа' алим идэх болно.
    • Boy will eat an apple '5 minutes from tomorrow'. => Хүү 'маргаашаас 5 минутын дараа' алим идэх болно.
      ... and so on .

    Maybe the example above was not appropriate but I tried my best I hope you get the idea.

  3. PR Allow grammar rule customization for unit declensions #2587 looks good enough for me.

Good job 👏👏👏

@kylekatarnls
Copy link
Collaborator

Hello, about the ago/before they are not the same, it's not just "before" it's "before an other event" this means it does not match your examples, it can be in the future (like in: before next Christmas)

@lucifer-crybaby
Copy link
Author

Technically yes, but it's still 'before' the next Christmas means it puts us before and that before can be present, past or even future and it gets complicated cuz it doesn't has specific time so i thought it can be same as ago in this repo cuz we can't display this blog posted before next Christmas or can we ? Anyway it's just my idea if you get the idea and you think it's right you can do whatever you want at last my goal was just to get the appropriate translations.

@kylekatarnls
Copy link
Collaborator

I'm not trying to force, I lack the language knowledge, just trying to make sure it's clear why we have both.

Basically we provide:

Carbon::parse('...')->diffForHumans(); // will use "ago" if it's before now, "from_now" if it's after now
Carbon::parse('...')->diffForHumans($otherDate); // will use "before" if it's before $otherDate, "after" if it's after $otherDate

We split the declension because in some languages, different declensions are needed. But if there is nothing specific in Mongolian, it's fine to keep as is.

Thanks. 🙏

@lucifer-crybaby
Copy link
Author

Yeah I can understand the differences in English but In Mongolian they can share the same translations.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translation Rely to internationalization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants