Jump to content

Template talk:Documentation/Flow

About this board

Make the template translatable

31
Shirayuki (talkcontribs)
Tacsipacsi (talkcontribs)

Who? You’re the admin and translation admin, you made the template untranslatable by overwriting translated versions with the module call. I could help with making them translatable again, but everything is fully protected because of the unnecessary cascading protection of Module:yesno. (By the way, we shouldn’t introduce yet another translation mechanism in addition to the Translate extension and Commons tabular data. The module should be translated entirely on Commons, except if something is absolutely local, when the Translate extension should be used—or the local thing should be avoided or put into a separate variable.)

Iniquity (talkcontribs)

We have one problem here. At the moment, the translation depends on the wiki language, not the user's language.

Tacsipacsi (talkcontribs)

This is not a problem, it’s the usual way on mediawiki.org: localization is based on page language instead of user language, which means pages use less different languages, for example, if you have French interface language and see a German page (including templates, e.g. Template:Documentation/de), you will text in German and English mixed, but never French.

Iniquity (talkcontribs)
Tacsipacsi (talkcontribs)

But I don’t think using a different method than the standard way is a good idea without some very good reasons. It’s a template, after all…

Iniquity (talkcontribs)

This method will allow translation to work on all wikis with this module :)

Tacsipacsi (talkcontribs)

I don’t understand you. What method are you speaking about? The current method works perfectly on all monolingual wikis, producing the output in the wiki language (if available, of course), and works well in multilingual that use this approach (MediaWiki.org, Meta etc.). Using UI language would produce good output on some other wikis like Commons, but disastrous on monolingual ones.

Iniquity (talkcontribs)

Why you think that it will be disastrous on monolingual ones?

Tacsipacsi (talkcontribs)

Because monolingual wikis are designed to be monolingual. Simply they should not use any language other than their language, because no one expects that. If I open the Italian Wikipedia, I want to read Italian articles, even if my UI language setting happens to be Czech. I don’t want to read partly-Italian, partly-English, partly-Czech articles; it also takes considerable time to switch between different languages while reading even if one’s fairly advanced in both languages, so using fewer languages helps users read faster.

Iniquity (talkcontribs)

>Because monolingual wikis are designed to be monolingual.

It is not true:) All interface messages and all basic templates are originally in English.

>I don’t want to read partly-Italian, partly-English, partly-Czech articles; it also takes considerable time to switch between different languages while reading even if one’s fairly advanced in both languages, so using fewer languages helps users read faster.

We are talking about the interface, not about the articles, templates and modules are part of the interface. No one forces you to read articles in 10 different languages. I'm just talking about controls and errors that can tell the user what to do with it.

Tacsipacsi (talkcontribs)

It is not true:) All interface messages and all basic templates are originally in English.

They are English, but monolingual wikis are not designed to be multilingual just because of that. These messages (and especially templates) should be translated as much as possible, and with that, the wiki suddenly becomes truly monolingual.

We are talking about the interface, not about the articles, templates and modules are part of the interface.

No, they are content. Although read not by readers but editors, they are mixed with content inevitably in the primary language, like local template documentation. Not to speak about templates facing directly the user, like navbar, or depending on parameters specified in the article namespace, like yesno.

Iniquity (talkcontribs)

Well then we have problems, because MediaWiki already translates the interface elements into the user's language. Change your user language and you will see it :)

Shirayuki (talkcontribs)

Show "TEMPLATE DOCUMENTATION [view] [edit] [history] [purge]" in the page language, like the existing Template:Documentation/ja (page language: ja)

Iniquity (talkcontribs)

I suggest to wait a bit now, and wait for an answer on my proposal to the TNT module.

Iniquity (talkcontribs)

@Shirayuki After some discussion, it turned out that it is impossible to translate the interface elements into the user language, I think we should translate the documentation itself only.

Tacsipacsi (talkcontribs)

I don’t understand. You mean keeping the documentation template English with no localization at all? I don’t like your idea of using user interface language, but English texts on a French wiki with French interface language for a user not speaking any language other than French is simply unacceptable. This whole thread is about making the template translatable, choosing not to translate it is not a solution.

Iniquity (talkcontribs)

I am talking only about displaying on the MediaWiki. We translate the module itself as we translated before.

Tacsipacsi (talkcontribs)
Iniquity (talkcontribs)

Now, as I understand it, the control elements will be in the wiki language. And the documentation itself can be done in the user's language through a standard extension. I just don’t understand very well how you can do differently for this wiki in the current situation.

Tacsipacsi (talkcontribs)

MediaWiki.org is not different. This module (and at the end the MediaWiki extension behind it) uses page content language, which is usually, but not necessarily, the same as the wiki content language (which is English for mediawiki.org). One major exception is pages translated using Extension:Translate, where the page language is properly set for translation versions, so Template:Extension/fr’s page content language is French, so its documentation template is in French.

Iniquity (talkcontribs)

Hm, thanks for the clarification. For some reason I thought it worked differently.

Shirayuki (talkcontribs)
Tacsipacsi (talkcontribs)

Because there’s no Japanese translation for the module. I’ve done the internationalization part, and added French translation to c:Data:I18n/Documentation.tab for the sake of testing, but Iniquity stopped me, so I haven’t done the localization part. It’s probably better anyways if the translation is added by someone who speaks the language, as I’ve had some headache when I added French texts and it turned out that the English ones diverged from the state when French translation was done, so I had to figure out what changes are needed, which was hard for French, but would be impossible for Japanese.

Iniquity (talkcontribs)

Yes, now we can continue to work, we talked with the developer of the module and for now everything remains in the same place.

Tacsipacsi (talkcontribs)

All translations should be on Commons now, so it’s time to switch the Translate extension back on.

E L Yekutiel (talkcontribs)

Hi, sorry for reviving this 5-year-old thread...

I added "he": translations for many terms in the table c:Data:I18n/Documentation.tab, and thought that the "he" version of this template would display them e.g. in the box title line. For some reason, this doesn't happen, and I still see the English text.

In other languages (fr, de, ja) I see the title text in the page language. Am I wrong to assume that this table is where the translation should take place? Or is it maybe just a matter of time, and it can take a few days or so until the update in the table propagates through the module to the template?

Thanks!

Tacsipacsi (talkcontribs)

It’s indeed a matter of time: I already see the box title translated, as well as part of the box footer (which is quite hard to read in this state due to it switching back and forth between right-to-left and left-to-right; I recommend you to either finish the translation to make it entirely right-to-left, or remove the existing parts to make it fully left-to-right).

E L Yekutiel (talkcontribs)

Tacsipacsi, thanks a lot for your response!

Late addition: please ignore the following, once I made a blank edit in the he: version of the transcluding template's page (e.g. here, or in Template:Warning/he), the translation is refreshed and I can see it! Thanks a lot!

Old response: Strangely, I still don't see any translations from that table reflecting in e.g. the template page (which uses the template).

In any case, I extended the he: translation (I think that I only skipped the two error messages at the beginning of the table. I hope that I didn't miss anything else).

Thanks a lot again for your help!

Tacsipacsi (talkcontribs)

If you enable the UTC clock gadget (“A clock in the personal toolbar…”) in your preferences, clicking the clock should suffice, without having to make useless edits (in case you don’t have anything to improve; as far as I understand, now there was room for improvement anyway).

E L Yekutiel (talkcontribs)

Hi Tacsipacsi,

Thanks for the tip! I just added the clock gadget.

Regarding the blank edit, apparently it doesn't get recorded in the page history (although I wrote a short edit summary). I just tested it again now by adding a space in the edit window of one of the sections in the translated page, deleting it, and publishing the changes, and there's nothing in the history (at least that I can see). The improving edit to which you refer is another edit I made just afterwards, when I could finally see the translated content (and noticed that it should be modified).

In any case, a direct purge is probably the best way to do it :) Thanks a lot again!

Reply to "Make the template translatable"

Alter the protection level

1
64.114.239.29 (talkcontribs)

Since it is used in interface messages, please alter the protection level from 'semi' to 'full'. Thanks!

Reply to "Alter the protection level"

.svg icons not appearing on local wiki when importing pages (Please help)

2
61.245.154.97 (talkcontribs)

.ts-doc-heading {

display: inline-block;

padding-left: 30px;

background: url(//upload.wikimedia.org/wikipedia/commons/f/fb/OOjs_UI_icon_puzzle-ltr.svg) center left/24px 24px no-repeat;

height: 24px;

line-height: 24px;

font-size: 13px;

font-weight: 600;

letter-spacing: 1px;

text-transform: uppercase;

}

Tacsipacsi (talkcontribs)

What local wiki? Most probably either it’s malconfigured, or a firewall or connection issue causes the problem.

Reply to ".svg icons not appearing on local wiki when importing pages (Please help)"

Category:Template documentation

3
Bdijkstra (talkcontribs)

Is it the intention that all templates and modules with documentation are in the Category:Template documentation? I think not, and I tried to fix it, but I guess me not being a translation admin is a hurdle.

Shirayuki (talkcontribs)

As I wrote in edit summary, for example, Template:Caution is not only a template but its documentation. So it is correct behavior.

Bdijkstra (talkcontribs)

Ah, I was wondering what Template:Caution had to do with anything, but now I see you mentioned it as example. Thanks for the clarification.

Reply to "Category:Template documentation"

Error with nested templates

6
Viztor (talkcontribs)

It does not seem to include properly of documentation. See Template:Module_rating and Template:Module_rating/doc for detail.

It was fine in /doc that shows {{module rating|rating}}

while in / , it somehow shows <span style="font-family:"Consolas", monospace;">{{[[Template:module rating|module rating]]|''rating''}}</span>

Iniquity (talkcontribs)

Thanks for your feedback. Can you describe the problem in more detail? I can not find the error.

Viztor (talkcontribs)

See usage section.

Iniquity (talkcontribs)

Oh, I see. I'll think what can be done with this, I'm not sure that this is because of my edits.

Viztor (talkcontribs)

the bug will surface if there is another template nested like {{pre|{{tlx|pre}}}}, which shows

<span style="font-family:"Consolas", monospace;">{{[[Template:pre|pre]]}}</span>

Hmm. Now it seems like problem with pre. it works on itsown on a standalone page though, weird.

Tacsipacsi (talkcontribs)

Putting {{/doc}} on main template page is still OK, but {{documentation|content={{/doc}} }} is not. Even weirder.

Reply to "Error with nested templates"

Does not clear float.

2
Viztor (talkcontribs)

anything floats will overlap with the documentation.

Tacsipacsi (talkcontribs)
Reply to "Does not clear float."

[bug] Error with section edit

1
Viztor (talkcontribs)

If you click the edit button on any other template, it will direct you to edit Module:Documentation instead of the doc itself.

Reply to "[bug] Error with section edit"
Shirayuki (talkcontribs)

Lua error in Module:Protection_banner at line 770: attempt to call upvalue 'makeFileLink' (a nil value).

SPage (WMF) (talkcontribs)

Yes, I noticed it. Pages invoke this which calls Module:Documentation which calls Module:Protection_banner. hashar recently imported "latest" versions of those Lua modules from enwiki, actually unchanged for months on enwiki. Maybe they don't work well on a multilingual wiki?

Krinkle (talkcontribs)

I've reverted the template back to a stable version.

This post was hidden by 137.147.180.136 (history)
Shirayuki (talkcontribs)

Thanks.

Paladox (talkcontribs)

I fixed the module documentation now and template documentation was reverted back to module documentation.

99.226.18.0 (talkcontribs)

I've just deleted that p.protectionTemplate(env) function and :wikitext(p.protectionTemplate(env)) in my local wiki and it started to work.

Reply to "Lua error"
Summary by Iniquity
Iniquity (talkcontribs)

So everyone gets rid of the icons and colors of the old sample, I slightly changed the design of the template by analogy with the template from the Russian Wikipedia. Which changes:

  • Cleaner HTML. Separate blocks and classes for header, content and footer blocks.
  • All styles are transferred to CSS - Module:Documentation/sandbox/styles.css.
  • Color changed from green to common blue.
  • Footer is no longer built on {{fmbox}}.
  • Added some fixes from English Wikipedia.
  • Replaced documentation icon for icon from OOUI set.
  • Replaced sandbox icon for more cleaner.
  • Add translation table Module:Documentation/sandbox/i18n

Please, check it here - Template:Documentation/sandbox :)

Tomybrz (talkcontribs)
Iniquity (talkcontribs)

Hi, @Tomybrz. This template works for me. Tell me, please, where are you testing it?

Tomybrz (talkcontribs)
Iniquity (talkcontribs)

>I forgot to say i found the problem few hours ago.

So, is it ok now? :)

>But i have another question, how Module:Documentation/sandbox/i18n work ?

You can found some information here - Multilingual Templates and Modules. For now, the language provided depends on the language of the local wiki, and not on the user's settings. for example, in Russian Wikipedia it will be Russian, in French Wikipedia it will be French.

Tomybrz (talkcontribs)
  1. Yes
  2. Oh :( I tought it's work for user's settings, my bad sorry.
Iniquity (talkcontribs)

I tought it's work for user's settings too :( So what do you think of my module changes? :)

Tomybrz (talkcontribs)

It's very nice, but it's a big change, and if you need to update this module, i think you should ask other mediawiki.org user too. Regards

Iniquity (talkcontribs)

Can you tell me where I should do this? This will help me a lot, thanks :)

Tomybrz (talkcontribs)
Iniquity (talkcontribs)

Thanks :)

Shirayuki (talkcontribs)

Make this template translatable.

Garonenur (talkcontribs)

I second this.

It would be really helpfull for multilingual Wikis (I will have at least 3 languages in our companywiki) if this template/module would work well with Extension:Translate.

Garonenur (talkcontribs)

I had a look at the lua-module but I am not sure how to change it in a way that would allow to check vor multi language /doc pages.

Reply to "Translation"