Open Bug 496359 Opened 15 years ago Updated 7 years ago

[silme] Add support for gettext plural forms

Categories

(Localization Infrastructure and Tools :: Silme, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: sethb, Unassigned)

References

()

Details

Silme does not provide support for gettext plural forms.  In a future release, we should add support for gettext plural forms.

I would like to add this to the Silme 0.7 release, but it is up to Gandalf.  If we can get someone to take lead on this, then let's add it.  If it is just Gandalf, he may have too much to do for 0.7.
it's on the list for 0.7. We'll see how much we can fit. If not, it'll get for 0.8
Blocks: 495229
I'm trying to solve it in a more holistic way (so, to support many potential parameters that should allow us to select one of the values from a list)

I created several approaches to that, and got them down to two:

1) We either extend entity.get_value to something like entity.get_value(params={'plural':1})
2) or we create a separate function for getting extended entities values (something like gettext's ngettext())

The main issue with approach 1) is performance drop (hopefully minimal) due to at least one additional check per each get_value.

Also, it means that we need to allow the value to be a list (which is compatible with L20n approach anyway).

I'm experimenting with doing sacrificing some performance and keeping the API clean (so approach nr. 1) and testing how entity value behaves if it's a list.

In this approach if a value is a list, we can use any logic combined with params={} argument to select which of the elements from the list should be returned on get_value.
Status: NEW → ASSIGNED
No longer blocks: 495229
This is a mass change. Every comment has "assigned-to-new" in it.

I didn't look through the bugs, so I'm sorry if I change a bug which shouldn't be changed. But I guess these bugs are just bugs that were once assigned and people forgot to change the Status back when unassigning.
Status: ASSIGNED → NEW
Moving Silme bugs to its component.

[Mass change filter: silme-move]
Component: Infrastructure → Silme
Product: Mozilla Localizations → Localization Infrastructure and Tools
You need to log in before you can comment on or make changes to this bug.