Ticket #3677 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

i18n for number_format()

Reported by: markjaquith Assigned to: rob1n
Priority: low Milestone: 2.3
Component: i18n Version:
Severity: normal Keywords: has-patch i18n commit
Cc: nbachiyski, Sewar

Description

We're using number_format() in a few places, which converts to American style formatting for thousands grouping. We might consider making a __number_format() function that localizers can use to format numbers appropriately.

Attachments

number-format-i18n.diff (1.7 kB) - added by nbachiyski on 01/26/07 12:12:38.
number_format_i18n function
number-format-i18n-uses.diff (3.4 kB) - added by nbachiyski on 01/26/07 12:13:10.
let's use this number_format_i18n
3677.diff (2.3 kB) - added by Sewar on 05/20/07 17:06:46.
Moving the variables to $locale.php

Change History

01/25/07 20:56:39 changed by foolswisdom

  • cc set to nbachiyski.

01/26/07 12:12:07 changed by nbachiyski

  • keywords set to has-patch i18n.

I named the function number_format_i18n after date_i18n. There are two patches - the first is the function implementation. The second one just substitutes number_format with number_format_i18n wherever I found occurrences. I have skipped Akismet. It could fallback to number_format if the new function does not exists, but may be some other time :)

01/26/07 12:12:38 changed by nbachiyski

  • attachment number-format-i18n.diff added.

number_format_i18n function

01/26/07 12:13:10 changed by nbachiyski

  • attachment number-format-i18n-uses.diff added.

let's use this number_format_i18n

03/27/07 17:03:35 changed by foolswisdom

  • milestone changed from 2.2 to 2.3.

04/25/07 00:44:19 changed by rob1n

  • owner changed from ryan to rob1n.

I like this. +1.

04/25/07 00:46:07 changed by rob1n

  • keywords changed from has-patch i18n to has-patch i18n commit.
  • component changed from General to i18n.

04/25/07 00:49:57 changed by rob1n

  • status changed from new to closed.
  • resolution set to fixed.

(In [5308]) Allow number_format to be internationalized. Props nbachiyski. fixes #3677

05/20/07 16:49:14 changed by Sewar

  • cc changed from nbachiyski to nbachiyski, Sewar.
  • status changed from closed to reopened.
  • resolution deleted.

Let's move these variables from gettext system to $locale.php. It is created for such things.

05/20/07 17:06:46 changed by Sewar

  • attachment 3677.diff added.

Moving the variables to $locale.php

05/20/07 21:09:16 changed by nbachiyski

If I must be honest, I would like to keep at most information as we can in gettext. Otherwise many translators may no even look at the possibilities that $locale.php gives and just translate the po file.

05/25/07 15:35:22 changed by rob1n

  • status changed from reopened to closed.
  • resolution set to fixed.