?
avatar horus68
horus68
6 Nov 2015

/administrator/en-GB.com_banners.ini has some similar keys (5) ends by numbers and are considered as Plurals when working with some translation software.
They are not plurals and this caused issues when translating (not all languages has plurals and 5 is to much for all!)
Considering that this strings do not follow the normal way Joomla use for keys they should be changed.

File: https://github.com/joomla/joomla-cms/blob/staging/administrator/language/en-GB/en-GB.com_banners.ini

The keys (line 129):

COM_BANNERS_FIELD_VALUE_1="Unlimited"
COM_BANNERS_FIELD_VALUE_2="Yearly"
COM_BANNERS_FIELD_VALUE_3="Monthly"
COM_BANNERS_FIELD_VALUE_4="Weekly"
COM_BANNERS_FIELD_VALUE_5="Daily"

Should be:

COM_BANNERS_FIELD_VALUE_UNLIMITED="Unlimited"
COM_BANNERS_FIELD_VALUE_YEARLY="Yearly"
COM_BANNERS_FIELD_VALUE_MONTHLY="Monthly"
COM_BANNERS_FIELD_VALUE_WEEKLY="Weekly"
COM_BANNERS_FIELD_VALUE_DAILY="Daily"

Note this other COM_BANNERS_FIELD_VALUE_ on the same file:

COM_BANNERS_FIELD_VALUE_CUSTOM="Custom"
COM_BANNERS_FIELD_VALUE_IMAGE="Image"
COM_BANNERS_FIELD_VALUE_USECLIENTDEFAULT="-- Use Client Default --"
COM_BANNERS_FIELD_VALUE_USECOMPONENTDEFAULT="-- Use Component Default --"
avatar horus68 horus68 - open - 6 Nov 2015
avatar zero-24 zero-24 - change - 6 Nov 2015
Labels Added: ?
avatar horus68
horus68 - comment - 6 Nov 2015

Related code files:
/administrator/components/com_banners/models/forms/filter_clients.xml

    <field name="purchase_type" type="list"
        label="COM_BANNERS_FILTER_PURCHASETYPE_LABEL"
        description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
        default="0"
        onchange="this.form.submit();"
    >
        <option value="">COM_BANNERS_SELECT_TYPE</option>
        <option value="1">COM_BANNERS_FIELD_VALUE_1</option>
        <option value="2">COM_BANNERS_FIELD_VALUE_2</option>
        <option value="3">COM_BANNERS_FIELD_VALUE_3</option>
        <option value="4">COM_BANNERS_FIELD_VALUE_4</option>
        <option value="5">COM_BANNERS_FIELD_VALUE_5</option>
    </field>

/administrator/components/com_banners/models/forms/client.xml

    <field name="purchase_type" type="list"
        label="COM_BANNERS_FIELD_PURCHASETYPE_LABEL" description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
        default="0"
    >
        <option value="-1">JGLOBAL_USE_GLOBAL
        </option>
        <option value="1">COM_BANNERS_FIELD_VALUE_1
        </option>
        <option value="2">COM_BANNERS_FIELD_VALUE_2
        </option>
        <option value="3">COM_BANNERS_FIELD_VALUE_3
        </option>
        <option value="4">COM_BANNERS_FIELD_VALUE_4
        </option>
        <option value="5">COM_BANNERS_FIELD_VALUE_5
        </option>
    </field>

/administrator/components/com_banners/models/forms/banner.xml

    <field name="purchase_type" type="list"
        label="COM_BANNERS_FIELD_PURCHASETYPE_LABEL" description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
        default="0">
        <option value="-1">COM_BANNERS_FIELD_VALUE_USECLIENTDEFAULT
        </option>
        <option value="1">COM_BANNERS_FIELD_VALUE_1
        </option>
        <option value="2">COM_BANNERS_FIELD_VALUE_2
        </option>
        <option value="3">COM_BANNERS_FIELD_VALUE_3
        </option>
        <option value="4">COM_BANNERS_FIELD_VALUE_4
        </option>
        <option value="5">COM_BANNERS_FIELD_VALUE_5
        </option>
    </field>

/administrator/components/com_banners/config.xml

    <field
        id="purchase_type"
        name="purchase_type"
        type="list"
        label="COM_BANNERS_FIELD_PURCHASETYPE_LABEL"
        description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
        default="0"
        >
        <option
            value="1">COM_BANNERS_FIELD_VALUE_1</option>
        <option
            value="2">COM_BANNERS_FIELD_VALUE_2</option>
        <option
            value="3">COM_BANNERS_FIELD_VALUE_3</option>
        <option
            value="4">COM_BANNERS_FIELD_VALUE_4</option>
        <option
            value="5">COM_BANNERS_FIELD_VALUE_5</option>
    </field>
avatar brianteeman
brianteeman - comment - 6 Nov 2015

Makes sense to me to give the keys meaningful names - the only problem is
that there is a policy NOT to remove existing strings so we can't change
them we can only add new strings and that doesn't solve your specific
problem

On 6 November 2015 at 12:07, Horus68 notifications@github.com wrote:

Related code files:
/administrator/components/com_banners/models/forms/filter_clients.xml
label="COM_BANNERS_FILTER_PURCHASETYPE_LABEL"
description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
default="0"
onchange="this.form.submit();"

COM_BANNERS_SELECT_TYPE
COM_BANNERS_FIELD_VALUE_1
COM_BANNERS_FIELD_VALUE_2
COM_BANNERS_FIELD_VALUE_3
COM_BANNERS_FIELD_VALUE_4
COM_BANNERS_FIELD_VALUE_5

/administrator/components/com_banners/models/forms/client.xml
label="COM_BANNERS_FIELD_PURCHASETYPE_LABEL"
description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
default="0"

JGLOBAL_USE_GLOBAL

COM_BANNERS_FIELD_VALUE_1

COM_BANNERS_FIELD_VALUE_2

COM_BANNERS_FIELD_VALUE_3

COM_BANNERS_FIELD_VALUE_4

COM_BANNERS_FIELD_VALUE_5

/administrator/components/com_banners/models/forms/banner.xml
label="COM_BANNERS_FIELD_PURCHASETYPE_LABEL"
description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
default="0">
COM_BANNERS_FIELD_VALUE_USECLIENTDEFAULT

COM_BANNERS_FIELD_VALUE_1

COM_BANNERS_FIELD_VALUE_2

COM_BANNERS_FIELD_VALUE_3

COM_BANNERS_FIELD_VALUE_4

COM_BANNERS_FIELD_VALUE_5

/administrator/components/com_banners/config.xml
id="purchase_type"
name="purchase_type"
type="list"
label="COM_BANNERS_FIELD_PURCHASETYPE_LABEL"
description="COM_BANNERS_FIELD_PURCHASETYPE_DESC"
default="0"

value="1">COM_BANNERS_FIELD_VALUE_1
value="2">COM_BANNERS_FIELD_VALUE_2
value="3">COM_BANNERS_FIELD_VALUE_3
value="4">COM_BANNERS_FIELD_VALUE_4
value="5">COM_BANNERS_FIELD_VALUE_5


Reply to this email directly or view it on GitHub
#8295 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar horus68
horus68 - comment - 6 Nov 2015

It's not just a "meaningful names" issue.
This is really an issue on working with plurals (and Crowdin at least) and should be considered as a BUG.

Next major version, maybe?

avatar brianteeman
brianteeman - comment - 6 Nov 2015

Yes it would have to be in j4 according to current policies
On 6 Nov 2015 12:14 pm, "Horus68" notifications@github.com wrote:

Next major version, maybe?


Reply to this email directly or view it on GitHub
#8295 (comment).

avatar Bakual
Bakual - comment - 6 Nov 2015

To deal with the B/C issue we can leave the old strings there and just add new ones with better key names. Since the old ones would not be used anymore, it wouldn't matter if they are not translated because they are threated as plural.

avatar Bakual
Bakual - comment - 6 Nov 2015

See and test #8300.

avatar zero-24
zero-24 - comment - 6 Nov 2015

Closing as we have a PR. Thanks

avatar zero-24 zero-24 - change - 6 Nov 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-06 21:49:30
Closed_By zero-24
avatar zero-24 zero-24 - close - 6 Nov 2015

Add a Comment

Login with GitHub to post a comment