Template talk:Assessments

From Wikimedia Commons, the free media repository
Jump to: navigation, search
alt= link=
Archives
Archive 1 Archive 2


Scribunto[edit]

I've created a concept of Lua rewrite of this template: Module:Assessments. If you can, please help me complete it. --Ricordisamoa 17:33, 21 January 2014 (UTC)

It will be nice if you can add a provision to include VI nomination page too (like com-nom). Every VI has a nomination page. Eg: Commons:Valued image candidates/Danaus chrysippus male 2 by kadavoor.jpg. Jee 17:52, 21 January 2014 (UTC)
I think it would be also nice to have documentation, test and test-results pages. I would give a hand, but I am working on Module:Coordinates. --Jarekt (talk) 18:19, 21 January 2014 (UTC)
@Jarekt, Dschwen, Slaunger, 99of9: the module is now working flawlessly, replacing {{Assessments/images}}, {{Assessments/images/left}} and {{Assessments/images/right}} as well; see some testcases. Now all VI-specific parameters need to be worked on. --Ricordisamoa 23:54, 14 February 2014 (UTC)
Seems OK; need VI parameters too. Jee 12:45, 15 February 2014 (UTC)
Improved handling of errors and added new testcases. --Ricordisamoa 16:00, 19 February 2014 (UTC)
@Jarekt: Do you think it is ok to deploy it now, or would it be better to implement Valued Images or #Internationalization first? --Ricordisamoa 19:28, 7 June 2014 (UTC)

Internationalization[edit]

Currently, we have dozens of translated subpages full of complex wikicode. Using the Translate extension, we should be able to split them into simpler strings, and use them directly through Module:Assessments.

I used to manage translations here at Commons, and I may apply for translation adminship again. But anyway, it's a very hard work and someone should help me. --Ricordisamoa 19:04, 21 February 2014 (UTC)

What did you have in mind? I tried to use translation extension for translating templates (an a VERY simple case), and never got it to work correctly. We could just write it in Lua: kind of like Module:Coordinates which placed all the translations in Module:i18n/coordinates. May be do the same with Module:Assessments where all the translations will be placed in Module:I18n/assessments? Either way you do not need to be translation admin for that. --Jarekt (talk) 03:33, 8 June 2014 (UTC)
@Jarekt: I thought of creating a page (Template:Assessments/i18n) in which to list all English messages in plain text. Then, after having it translated through the extension, the module would have loaded the needed messages via getContent() and displayed them within the box. I'm not going to apply for translation adminship for that ;-) --Ricordisamoa 20:30, 8 June 2014 (UTC)
I learn something every day. Are there any pages that already use that technique so I can observe it? --Jarekt (talk) 03:38, 9 June 2014 (UTC)
Not AFAIK. I like pioneering ;-) --Ricordisamoa 09:02, 10 June 2014 (UTC)
Than I would create a Template:Assessments/i18n with may be 2 messages and try to get it to work first. --Jarekt (talk) 11:35, 10 June 2014 (UTC)
@Jarekt: ✓ Done --Ricordisamoa 22:35, 11 June 2014 (UTC)
I can mark it for translation but I still do not understand how you going to pick message #1 or #2 with getContent(). --Jarekt (talk) 01:59, 12 June 2014 (UTC)
The translate extension will immediately populate Translations:Template:Assessments/i18n/1/en, Translations:Template:Assessments/i18n/2/en, etc., and Translations:Template:Assessments/i18n/1/it, etc. will be created by translators using the extension's GUI. --Ricordisamoa 04:16, 12 June 2014 (UTC)

┌─────────────────────────────────┘
User:Ricordisamoa I just run into Template:Translatable template template which might be an officially sanctioned way of achieving what you aim for. --Jarekt (talk) 17:25, 17 June 2014 (UTC)

@Jarekt: I see. That surely works with simple text-based templates, but I don't know if it is being actually used within some complex Scribunto-based ones. I think I'll dive into my proposal then. Thanks for your help. --Ricordisamoa 00:51, 1 July 2014 (UTC)
@Jarekt: unfortunately, the string.format native function in Lua doesn't support named arguments, so it is not suitable for localization. --Ricordisamoa 14:36, 11 August 2014 (UTC)