Page MenuHomePhabricator

Message MediaWiki:coll-load_local_book message: "Cancel" and "Ok" are untranslated in the subwindow
Closed, ResolvedPublic

Description

Message coll-load_local_book should be using {int:}} on "Ok" and "Cancel"
so as to get the correctly localized versions of either string. If that is not
possible, it should document (in the /qqq pseudo-language space) where these
are localized so as to allow translators to use consistent wording. If these
strings cannot be localized, also this needs to be documented so as to tell
translators not to translate them.

The message needs to use PLURAL on %NUMPAGES%. See
http://www.mediawiki.org/wiki/I18n#Be_aware_of_PLURAL_use_on_all_numbers
why the idea that you rarely have colloctions of one page only does not
make PLURAL avoidable.

It would be better to use normal MediaWiki style substitutions ($1, $2, ...)
instead of special ones like %TITLE% and %NUMPAGES%.

Trying to make all these requierd changes or additons, I found the source
code using this message somewhat unreadable since it embeds the message
into something looking like JavaScript to me without giving a clue where
the parameters come from. I am not a user of the extension Collection,
I am only a translator. but this one appears to me a quite central message.
If the extension is meant for broad public use - why else would its messages
be translated? - then I suggest that to rethink this. While it is permissible
to have Javascript on secure sites, you cannot use it safely elsewhere, and
you must permit users not to accept JavaScript of which they have no way to
know that a true copy of what a host has sent arrived on their clients,
That is, you can use JavaScript for non-essentials that are nice to have,
but you cannot rely on JavaScript to function on the clients side, leave
alone that there are browsers and environments that just cannot run them.
Putting required functionality into JavaScript thus is just insane; and
by the way, is always unnecessary.


Version: unspecified
Severity: normal
URL: http://translatewiki.net/w/i.php?title=Support&offset=20101005110824#MediaWiki:coll-load_local_book_7879

Details

Reference
bz25442

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:13 PM
bzimport set Reference to bz25442.
bzimport added a subscriber: Unknown Object (MLST).

johannes.beigel wrote:

The problem is exactly that this message is used in JavaScript code: It is shown in a JavaScript confirm() dialog when a collection has been found in the local storage[1] when the user wants to activate the book creator. At the time this message is sent to the client, the number of wiki pages in the collection isn't known yet and I'm not sure how to handle {{int:}} when a message is not rendered by MediaWiki. But I'm aware that these i18n problems are existent and should be taken care of – it's just not trivial to do so :-/

Regarding your points about JavaScript code:

You can believe me that this code wouldn't be there if it was possible to do this in an easier way (and if it is, please tell me how to do it, I'll change it immediately!). The main problem is that the lifetime of cookies on WMF wikis is quite a restriction for the Collection extension: they expire on browser close. And as we don't want to (and probably won't be allowed to) use database tables to store the collections for users (which would be possible only for logged-in users anyway), cookies or some client-side technique like local storage are the only option. This is a topic that has gotten lots of thoughts and discussions and I think the users are quite happy the way it's working right now.

[1] We're using http://www.jstorage.info/ to support more techniques than only actual "local storage", which isn't available for all browsers.

(In reply to comment #1)

The problem is exactly that this message is used in JavaScript code:

Since this is JS and Resource Loader is now in place, does it still exist?

"Cancel" and "Ok" are still untranslated in the subwindow.

Adding many blockers of bug 38638 to the list of "easy" bugs, to mark them as candidates for [[mw:Google Code-in]] tasks (gci2013). If you think this bug is not suitable, remove the keyword.

This is strictly an i18n issue (i.e. there is no i18n at all for those messages).

Dylsss subscribed.

qqq says not to translate "Ok" and "Cancel" (https://translatewiki.net/wiki/MediaWiki:Coll-load_local_book/qqq), normal MediaWiki substitutions are used, and PLURAL is used (https://www.mediawiki.org/w/index.php?title=MediaWiki:Coll-load_local_book&action=edit). It's impossible to translate "Ok" and "Cancel" unless Collection is migrated to some UI library for the popup, e.g. OOUI, which is very unlikely to happen in the near future. Seems to be fixed as much as possible.