Skip to content

Loading…

Revert commits that broke the usage of 'distance_of_time_in_words' in Colombian Spanish #318

Merged
merged 1 commit into from

6 participants

@andmej

This reverts commit e6a1c4f.

This commit broke the meaning of "distance_of_time_in_words". That
method is supposed to return the description of a time interval
without specifying if it's in the future or in the past. That is,
it should return "about 1 hour" instead of "about 1 hour ago" or
"in about 1 hour from now".

Well, this commit replaced "about 1 hour" with "1 hour ago", which is
wrong. You can't now use the "distance_of_time_in_words" method to
describe dates in the future, because the final result would be
something like "in about 2 hours ago from now".

@andmej andmej Revert "Change about_x_* from 'cerca de' to 'hace'"
This reverts commit e6a1c4f.

This commit broke the meaning of "distance_of_time_in_words". That
method is supposed to return the description of a time interval
without specifying if it's in the future or in the past. That is,
it should return "about 1 hour" instead of "about 1 hour ago" or
"in about 1 hour from now".

Well, this commit replaced "about 1 hour" with "1 hour ago", which is
wrong. You can't now use the "distance_of_time_in_words" method to
describe dates in the future, because the final result would be
something like "in about 2 hours ago from now".
d10f443
@kuroda
Collaborator

@EdgarOrtegaRamirez What do you think about this? Can I revert your commit?

@andmej

By the way @kuroda, es-419, es-AR, es-CL, es-MX, es-PE, es-VE and es all exhibit the correct behavior. es-CO is the only Spanish locale that's currently broken.

@andmej

@nhocki, @jpemberthy, @acadavid, what do you think? (These are all native Spanish speakers from Colombia)

@nhocki

Yes. I'm :+1: for reverting. The "distance" should not care if it's future or past. In fact, it should always be non-negative and symmetric (since its a metric).

You could add the "ago" on your own helper without breaking the "original" one:

def my_distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {})
  if from_time > to_time
    "dentro de #{distance_of_time_in_words(from_time, to_time = 0, include_seconds, options)}"
  else
    "hace #{distance_of_time_in_words(from_time, to_time = 0, include_seconds, options)}"
  end
end
@jpemberthy

:+1: Yep, this commit should be merged.

@acadavid

+1 on reverting this.

I was wondering if "cerca a 1 hora" would make more sense rather than "cerca de 1 hora". In @nhocki's example, "dentro de cerca de 1 hora" sounds a bit weird, but "dentro de cerca a 1 hora" could work better. Even "aproximadamente 1 hora" could fit better. @nhocki @andmej @jpemberthy What do you guys think? May be you have a better counterexample.

@andmej

@acadavid, I agree with you. es.yml uses "alrededor de 1 hora" instead of "cerca de 1 hora", which sounds a little bit better. For Colombia, I would even go with "más o menos 1 hora" so that the final sentences are "dentro de más o menos 1 hora" and "hace más o menos 1 hora".

In any case we are nitpicking here. We all agree that "hace 1 hora" (@EdgarOrtegaRamirez's commit) is plainly wrong and needs to be reverted.

@EdgarOrtegaRamirez

ok, revert this commit. Sorry.

@kuroda kuroda merged commit 1a36323 into svenfuchs:master

1 check passed

Details default The Travis build passed
@nhocki

"Más o menos" sounds great if you're from MDE. I have no idea in other cities. Can @EdgarOrtegaRamirez give some input about this? Would más o menos be used in Barranquilla?

@EdgarOrtegaRamirez

@nhocki Yes, "Más o menos" is widely used.
This is the same to refer to the past:

  • Más o menos 1 hora
  • Cerca de 1 hoar
  • Hace 1 hora
@andmej
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 24, 2013
  1. @andmej

    Revert "Change about_x_* from 'cerca de' to 'hace'"

    andmej committed
    This reverts commit e6a1c4f.
    
    This commit broke the meaning of "distance_of_time_in_words". That
    method is supposed to return the description of a time interval
    without specifying if it's in the future or in the past. That is,
    it should return "about 1 hour" instead of "about 1 hour ago" or
    "in about 1 hour from now".
    
    Well, this commit replaced "about 1 hour" with "1 hour ago", which is
    wrong. You can't now use the "distance_of_time_in_words" method to
    describe dates in the future, because the final result would be
    something like "in about 2 hours ago from now".
Showing with 6 additions and 6 deletions.
  1. +6 −6 rails/locale/es-CO.yml
View
12 rails/locale/es-CO.yml
@@ -55,14 +55,14 @@ es-CO:
datetime:
distance_in_words:
about_x_hours:
- one: hace 1 hora
- other: hace %{count} horas
+ one: cerca de 1 hora
+ other: cerca de %{count} horas
about_x_months:
- one: hace 1 mes
- other: hace %{count} meses
+ one: cerca de 1 mes
+ other: cerca de %{count} meses
about_x_years:
- one: hace 1 año
- other: hace %{count} años
+ one: cerca de 1 año
+ other: cerca de %{count} años
almost_x_years:
one: casi 1 año
other: casi %{count} años
Something went wrong with that request. Please try again.