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

Tweaked Spanish Ordinalize and ToOrdinalWords format #222

Closed
wants to merge 3 commits into from

Conversation

thunsaker
Copy link
Contributor

Updated Spanish ToOrdinalWords to account for the special exception with 1st and 3rd which lose their "o" in the singular masculine form. We are inferring quantity here since the most common use of ordinals is singular (the first week, the 3rd quarter, the 16th amendment) and we can address quantity differences later, if needed, with issue #220. Related: #212

Slight modification to the formatting of Spanish Ordinals when using Ordinalize, based on new information, the proper format is to use a superscript a/o with a period after the number: 2.ª (segunda/second fem..) When ordinalizing primer (first), it goes to 1er instead of 1.er (see special exception from above) since there is no "er" superscript. The sites that display it are cheating using the <sup> tag, which I did here, but we can't do when outputting text to an end user. This exception also applies to 3rd (3er/tercer.) Thanks to the initial work done on #217 by @akamud.

Note: Depending on the font used, the o/a superscript is underlined in the code it is underlined, here it is not.

Way more information than anyone needs on Spanish Ordinals is available at the Real Academia Española

@thunsaker
Copy link
Contributor Author

Fellow Spanish localizers (@bangoker, @juan-hawa, @kblok), can you weigh in on something?

I made an executive decision not to use the period for "1er" since there is no "e" or "r" superscript character. Do you agree with that choice? or should we change it to "1.er"?

@kblok
Copy link
Contributor

kblok commented Apr 16, 2014

I've never read things like "6.º" with the "." between in my whole life, maybe it's a kind of cultural style.

On the other hand I think you are mixing ordinal styles.
Ex: If you write 1er you should write 100mo (from "centeciMO") or 25to (from "vigesimo quinTO")
If you choose to write 100° the output for "first" should be 1°

@kblok
Copy link
Contributor

kblok commented Apr 16, 2014

I've just read the RAE article and it backs you up with the "." issue, of course it's still strange to me, but I think that it is ok to follow the "official" rule maker.
But I don't see that it backs the mixing thing I mentioned above.

@ghost
Copy link

ghost commented Apr 16, 2014

I've always read it like 1.°, but if I had to choose, I'll go with 1.er ... but like @kblok said (and sorry for kind of repeating the same thing here), the mixing just feels wrong.

If I call 2.OrdinalizeNumber(...) and I get 2.°, then I expect that calling 1.OrdinalizeNumber(...) will get me 1.° not 1.er.

@thunsaker
Copy link
Contributor Author

Agreed, 1.er looks better even w/o the superscript.

Is 1.° the proper way to abbreviate primer/primero? and 3.° the proper way for tercer/tercero?

Is this a regional difference/preference? if so, should we split them out, or go with the least offensive version and leave it in es-ES.

@kblok, @juan-hawa where are you located? I'm in the US and learned Spanish in Paraguay so technically I'm more proficient in es-US/es-PY and a little es-MX, but not es-ES, which is what we are currently targeting. It seems the differences are more with vocabulary than with numbers.

I also noticed that the RAE lists the "proper" ordinals higher than 10, but it seems that in practice they only really go up to 10 at which point a switch is made the cardinal numbers.

He estado hablando Español por casí 11 años, no soy experto, entonces puedo cambiar lo que necesitemos.

@francisconoriega
Copy link

I've don't remember seeing the the period before the ° sign either, but it makes sense, makes it different from degrees. I would not use the dot before the "er/do/etc" endings though.

I think that it could be ok to use 1er / 2do / 3er / 4to without the upperscript though, it's pretty common. But whether ° or "er" is used, I agree that the important thing is that it should be consistent.

@kblok
Copy link
Contributor

kblok commented Apr 16, 2014

I'm from Argentina. If the RAE says it should be 1.° that's ok for me.

Now, moving to what you say about the use of ordinals with big numbers (or more than 10) in practice, I think that the problem is that most people don't know how to say it properly. Ex. 125° should be (I think 😛) "centésimo vigésimo quinto", some people would say, incorrectly, "ciento veinticincoavo", so it would be easier to say "ciento veinticinco" and move to another thing 😛

@MehdiK
Copy link
Member

MehdiK commented Apr 17, 2014

Hey guys, awesome discussion. Thanks.

Please let me know if you're happy with this so I can review and merge.

@thunsaker
Copy link
Contributor Author

Alright, I think this is how we go forward: primer/primero -> 1.° and tercer/tercero -> 3.° instead of using the "er" ending at all. IF we end up getting feedback from users, we might want to add some formatting options to allow a user to use between using the period and/or the superscript, let them decide.

@MehdiK I'll make the changes and rebase on the latest updates and let you know when everything is ready.

@francisconoriega
Copy link

I'd agree with that. It is actually very common (at least in México) and as
a reader, I automatically convert it into Prim_er_ or Prim_ero_, as needed.

On Thu, Apr 17, 2014 at 10:12 AM, Thomas Hunsaker
notifications@github.comwrote:

Alright, I think this is how we go forward: primer/primero -> 1.° and
tercer/tercero -> 3.° instead of using the "er" ending at all. IF we end up
getting feedback from users, we might want to add some formatting options
to allow a user to use between using the period and/or the superscript, let
them decide.

@MehdiK https://github.com/MehdiK I'll make the changes and rebase on
the latest updates and let you know when everything is ready.


Reply to this email directly or view it on GitHubhttps://github.com//pull/222#issuecomment-40738282
.

@thunsaker
Copy link
Contributor Author

@bangoker @kblok @juan-hawa can you please review what I've done and give the go ahead so @MehdiK can merge.

@kblok
Copy link
Contributor

kblok commented Apr 17, 2014

+1

@ghost
Copy link

ghost commented Apr 18, 2014

LGTM

@MehdiK
Copy link
Member

MehdiK commented Apr 19, 2014

Thanks a lot guys. This is merged now.

@MehdiK MehdiK closed this Apr 19, 2014
@MehdiK
Copy link
Member

MehdiK commented Apr 19, 2014

Thanks for the contribution. This is now available on NuGet as v1.23.1.

@thunsaker thunsaker deleted the es-OrdinalTweaks branch April 19, 2014 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants