Last modified: 2013-04-02 02:08:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42731, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40731 - Special properties (such as Creation_date) are not generated when no string in localised file
Special properties (such as Creation_date) are not generated when no string i...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-02 22:20 UTC by Toni Hermoso Pulido
Modified: 2013-04-02 02:08 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Toni Hermoso Pulido 2012-10-02 22:20:12 UTC
Hi,

I discovered this in a Spanish wiki.

If                

 '_CDAT' => 'Creation date',

was not present in SMW_LanguageEs.php, the property was not properly generated after a Semantic MediaWiki refresh.

Tested in SMW 1.7.1

By the way, this does not seem to be translated in translatewiki.net, does it?
Comment 1 MWJames 2012-11-07 07:08:49 UTC
Karsten any insights in terms of translations for this one?
Comment 2 Markus Krötzsch 2012-11-07 08:03:35 UTC
I have recently completed the SMW language files to contain at least English versions for all untranslated property names: https://gerrit.wikimedia.org/r/#/c/31593/ With this the actual problem will be gone.

The title of this bug is still true, so we may keep it open. I wonder if we could move to a message based translation for special properties anyway. This was not done originally due to performance problems with reading so many messages all the time. Maybe this needs to be revisited. An alternative would be to have a script that builds the language files automatically using messages. Then the files are like an PHP coded index for messages that we need a lot.
Comment 3 [[kgh]] 2012-11-07 08:52:34 UTC
tw.n covers only the i18n located in the messages, aliases and magic file. Thus Toni's observation is correct. Actually I am surprised that we already have that many translations for this. 

I do not believe that something like this will be included into the localisation workflow in the foreseeable future.
Comment 4 Markus Krötzsch 2012-11-07 09:08:44 UTC
Yes, that is what I meant. Hence it would be good to somehow integrate our code with the localisation workflow. There were three reasons for not doing this for the stuff in SMW_Language... so far:

(1) Some messages are needed very early (e.g., namespace names) and it used to be a problem to get messages at this stage of initialisation in the early days at all.

(2) Some messages need efficient inverse lookups. Given a user input, we need to find the special property message or alias that it belongs to. Doing this by cycling through all potential candidate messages seemed wasteful.

(3) The files do not have a fixed number of strings that they define. For example, it is unknown how many aliases some property should have (if any). To encode this in messages, one would need to ask translators to format their translations as a comma-separated list (or similar). Not sure if this works well. A similar situation is with the preferred date formats (day-month-year vs. month-day-year etc.), which are defined as an ordered list of format strings. Could be confusing for translators.

We could solve (1) and (2) by having a script that reads the messages to build PHP files that can be used for fast lookup. Alternatively, we could build this code every time it is needed, but this might not be very efficient, even if the retrieval of messages is efficient now.
Comment 5 [[kgh]] 2012-11-08 02:03:04 UTC
Perhaps there is a way to include these into the regular messages file and to let SMW pick them up there.
Comment 6 Jeroen De Dauw 2013-04-02 02:08:04 UTC
Removing this as blocker for 1.9, not sure why it was one

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links