Page MenuHomePhabricator

CLDR doesn't build pt files correctly
Open, MediumPublic

Description

Spun off form bug 34219

It would seem for cases like PT, there is a base language file, and then some variant (is that the right word?) overrides for PT itself, and for pt-br

Not using the base pt.xml means that the Language name list for Portuguese is very sparse in it's entries, as it only contains the "overrides", not including the base data

It wouldn't surprise me if this is also the case for other languages

(In reply to comment #6)

(In reply to comment #3)

For your information, the language names are taken from CLDR, which contains
relatively few language names for Portuguese:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/cldr/CldrNames/CldrNamesPt.php?view=markup

I downloaded the core.zip file from CLDR and inside common/main, the pt.xml
file contains more than 500 language names. It's possible that you're probably
using just the pt-PT.xml, which seems to just contain the exceptions to the
base pt.xml file.

(In reply to comment #7)

(In reply to comment #6)

(In reply to comment #3)

For your information, the language names are taken from CLDR, which contains
relatively few language names for Portuguese:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/cldr/CldrNames/CldrNamesPt.php?view=markup

I downloaded the core.zip file from CLDR and inside common/main, the pt.xml
file contains more than 500 language names. It's possible that you're probably
using just the pt-PT.xml, which seems to just contain the exceptions to the
base pt.xml file.

Similar looks to be for pt-br

It would seem that cldr doesn't honour fallbacks then... ie It should pull in
pt.xml, and then overwrite any duplicate keys with from the pt-pt file to
CldrNamesPt.php and pt-br file to CldrNamesPt_br.php


Version: unspecified
Severity: normal

Details

Reference
bz34760

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:18 AM
bzimport set Reference to bz34760.
bzimport added a subscriber: Unknown Object (MLST).

Or seemingly the pt-pt hack works for pt-br (1074 lines in the file), but doesn't for vanilla pt (191 lines in file)

hack to get pt-pt too

$languages['pt-pt'] = 'Foo';

This should have been fixed when I make the fallback chains of pt and pt-br include each other. CLDR definitely follows fallbacks but the meaning of plain pt code in MediaWiki and CLDR is different.

  • Bug 35487 has been marked as a duplicate of this bug. ***

malafaya: Is this still an issue?

For pt (CldrNamesPt.php), yes. It doesn't include for example 'en' (English) and 'sv' (Swedish). on the other hand, pt-br (CldrNamesPt_br.php) seems quite complete. Maybe the fallback is the other way around?

(In reply to comment #6)

For pt (CldrNamesPt.php), yes. It doesn't include for example 'en' (English)
and 'sv' (Swedish). on the other hand, pt-br (CldrNamesPt_br.php) seems quite
complete. Maybe the fallback is the other way around?

pt and pt-br both fall back to each other on MediaWiki, see https://commons.wikimedia.org/wiki/File:MediaWiki_fallback_chains.png
That said, I've no idea if it matters. :)