Summary: | ScriptForge.L10N service don't support Plural-Forms from correct .po file | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Racho <projekt> |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | UNCONFIRMED --- | ||
Severity: | enhancement | CC: | jp, rafael.palma.lima |
Priority: | medium | ||
Version: | 24.2.0.3 release | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 159638 |
Description
Racho
2024-02-07 22:49:57 UTC
Unfortunatelly msgid_plural is not supported. In ScriptForge's source code (which you can see in ScriptForge.SF_L10N module under Application Macros), in line 74 there's the comment: ''' NB: plural forms are not supported @JPL do you think it's possible to consider this enhancement for the L10N service? (In reply to Rafael Lima from comment #1) > Unfortunatelly msgid_plural is not supported. Thank you! (In reply to Rafael Lima from comment #1) > @JPL do you think it's possible to consider this enhancement for the L10N > service? I refer to https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html Let's distinguish: - "simple" plural forms: one form for a single value, another for >1 values. This could be implemented if enough demands are expressed through this channel. However a simple workaround is to put 2 Gettext() statements in an If ... = 1 Then ... Else ... End If structure. - complex plural forms where another translation is selected based on a formula. The number of concerned languages is low. Syntax analysis of the formula could lead to complex coding in Basic. I would not recommend tp make such a development, except, again, if there is a significant demand. (In reply to Jean-Pierre Ledure from comment #3) > (In reply to Rafael Lima from comment #1) > > @JPL do you think it's possible to consider this enhancement for the L10N > > service? > > I refer to > https://www.gnu.org/software/gettext/manual/html_node/Translating-plural- > forms.html > > Let's distinguish: > > - "simple" plural forms: one form for a single value, another for >1 values. > This could be implemented if enough demands are expressed through this > channel. However a simple workaround is to put 2 Gettext() statements in an > If ... = 1 Then ... Else ... End If > structure. > > - complex plural forms where another translation is selected based on a > formula. The number of concerned languages is low. Syntax analysis of the > formula could lead to complex coding in Basic. I would not recommend tp make > such a development, except, again, if there is a significant demand. You are right, I make it this one line in basic, for Polish: PluralForm = iif(Count = 1, "[0]", iif(Count mod 10>=2 and Count mod 10<=4 and (Count mod 100<10 or Count mod 100>=20), "[1]", "[2]")) My ask was to don't do it if it's in service. But you might want to give to https://help.libreoffice.org/latest/pl/text/sbasic/shared/03/sf_l10n.html?DbPAR=BASIC#bm_id571585843652319 information that it does not support msgid_plural |