I'm trying to create a translation group on localize.drupal.org for Breton (#1517408: Fix Breton plural formula on l.d.o), but when I try to add the correct plural formula on http://localize.drupal.org/admin/settings/language/edit/br I'm cut off after 128 characters.

(Breton plural forms are somewhat complicated, so this isn't enough...)

#8 1571076-plurla.patch961 bytesdroplet
PASSED: [[SimpleTest]]: [MySQL] 39,385 pass(es). View
#6 1571076-plurla.patch649 bytesdroplet
PASSED: [[SimpleTest]]: [MySQL] 39,148 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Gábor Hojtsy’s picture

Project: Plural formula configurator » Drupal core
Version: 6.x-1.x-dev » 8.x-dev
Component: Code » language system
Issue tags: +D8MI, +language-base

This is going to be a longer ride, since Drupal core itself limits the field in 128 chars. The UI merely exposes this limit so you don't get surprises when it is saved. It needs to be fixed first in the schemas. Drupal 6: http://drupalcode.org/project/drupal.git/blob/refs/heads/6.x:/modules/lo...

Now due to our backporting workflow/policy, this needs fixing in Drupal 8 then 7 then 6, then it can be deployed on localize.drupal.org. Yeah.

Should be a relatively easy fix but needs an update function too to change the field. It would be great if you could help work on this :)

yohannbzh’s picture

I am the one who asked for #1517408: Fix Breton plural formula on l.d.o.
I can maybe help but I only start on Drupal.
What is exactly the work to do?

yohannbzh’s picture

The update function seems to be the next one for Drupal 6 and 7 (i put 256 instead of 128) :

function locale_update_N() {
  db_change_field('languages', 'formula', 'formula', array(
    'type' => 'varchar',
    'length' => 256,
    'not null' => TRUE,
    'default' => '',
    'description' => 'Plural formula in PHP code to evaluate to get plural indexes.',

For Drupal 8, number of plurals and plural forms were removed from the languages schema (#1323176: Decouple UI translation language information from language list schema).

Gábor Hojtsy’s picture

Version: 8.x-dev » 7.x-dev

Right, does *not* apply to Drupal 8 as the data is not stored in a length restricted column.

yohannbzh’s picture

Can someone commit the update function (see my last comment) and the fix in the schemas?

droplet’s picture

Status: Active » Needs review
649 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,148 pass(es). View

Let's move forward

attiks’s picture

Status: Needs review » Needs work
+++ b/modules/locale/locale.install
@@ -202,6 +202,19 @@ function locale_update_7004() {
+    'length' => 255,

schema it self has to be altered as well, so new installs get the right length

13 days to next Drupal core point release.

droplet’s picture

Status: Needs work » Needs review
961 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,385 pass(es). View
attiks’s picture

Status: Needs review » Reviewed & tested by the community

Looking good

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x, thanks!

Does this also need backport to D6?

attiks’s picture

I guess so, I'll ask Gabor

Automatically closed -- issue fixed for 2 weeks with no activity.