Help talk:Extension:Translate

Jump to: navigation, search

About this board

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
Tuxxic (talkcontribs)

Hello,

I am using Special:ImportTranslations to import .po translations from offline translators.

When I import them, I can "Execute" (see screenshot)

But when I go to my page, the translations are not taken into account.

What do I do wrong ?

Reply to "Can't import .po files on my setup"
Kghbln (talkcontribs)

Hmm... which page is canonical for e.g. search engines. I have an English language source page and an English language subpage with /en. Well this does not just apply to search engines: Which English language page is supposed to be served to users?

Nikerabbit (talkcontribs)

Currently, the /en (or whatever is the source language) is only there to be used for transclusions (Template:TNT for example).

Kghbln (talkcontribs)

Well all languages should be treated equally so the /language code pages are the once to be served to the audience. Still not sure what search engines like Google make of it and what this means for sitemaps

Kghbln (talkcontribs)

Ah, did not see Nike's post.

Reply to "Canonical page for source language"
Kghbln (talkcontribs)

I have this on my page:

[[Kategorie:Beispiele{{#translation:}}|Beispiele]]

and I get

[[Kategorie:Beispiele/en]]
[[Kategorie:Beispiele{{#translation:}}|<translate>Beispiele</translate>]]

does help at all since the result is the same as above. However since I cannot expect English speaking people to know what "Beispiele" means the only way is seems to label the category.

This may be a noob question. I am sure there is a way but I currently do not get it. This example does not cover it so I am a bit lost.

Nikerabbit (talkcontribs)

Currently, as far as I know, MediaWiki does not support changing category names from what they actually are. There is a task requesting to support this: task T26139.

Tuxxic (talkcontribs)

@Nikerabbit : has plans changed on this task by any chance ? Because in fact this is what I request in my comment below.

Nikerabbit (talkcontribs)

I am not sure why you are asking me. My priorities are currently elsewhere.

Tuxxic (talkcontribs)

Sorry, I did ask because I thought you were in charge of this task.

I will wait to see it resolved or - better! - try to solve it myself when I get familiar with MediaWiki code.

Anyway you are always of good advice, and you helped me a lot. Thank you !

Kghbln (talkcontribs)

Ouch, admittedly I have never labeled a category differently. I took it for granted that this is possible. I guess this will be a nice feature with regard to content translation. Thanks a lot for pointing to the issue.

Andreas Plank (talkcontribs)

Just an idea: one could try to transclude the translated content of the page display title of the corresponding Translation name space page:

{{#ifexist: {{Translations:Kategorie:Beispiel/Page display title{{#translation:}}}}<!-- 
then transclucde content via {{…}}
-->|{{Translations:Kategorie:Beispiel/Page display title{{#translation:}}}}<!-- 
else
-->|Kategorie:Beispiel{{#translation:}}
}}

… or in general with the magic word {{FULLPAGENAME}}:

{{#ifexist: {{Translations:{{FULLPAGENAME}}/Page display title{{#translation:}}}}<!-- 
then-->|{{Translations:{{FULLPAGENAME}}/Page display title{{#translation:}}}}<!-- 
else-->|{{FULLPAGENAME}}{{#translation:}}
}}
Andreas Plank (talkcontribs)

I just realized (for the record so to say) that the page I’m testing in #ifexist: must be coded correctly as Translations:… and not as page transclusion {{Translations:…}}:

{{#ifexist: Translations:{{FULLPAGENAME}}/Page display title{{translation:}}<!-- 
then -->|{{Translations:{{FULLPAGENAME}}/Page display title{{translation:}}}}<!-- 
else -->|{{FULLPAGENAME}}
}}
Kghbln (talkcontribs)

Thanks for your suggestion. The idea I came up with is to do

<translate>Categories:</translate> [[:Category:General{{#translation:}}|<translate>General</translate>]]

[[Category:General{{|translation:}}]]

and add the HIDDENCAT behaviour switch to "Category:General{{#translation:}}". This is a bit of work depending on how many categories there are as well as make the display of the category link [[:Category:General{{#translation:}}|<translate>General</translate>]] appear as if the added category was never hidden but I quite like it.

Tuxxic (talkcontribs)

Hi,

I came upon this help topic and it helped a lot.

I need to do a slightly different thing than @Kghbln : my goal is to have the translated category name, but point it to the translated link

Like "Catégorie:Blanc" displays "Catégorie:White" but points to "Catégorie:Blanc/en"

Reply to "How to translate category labels"

Is it possible to hide category pages not in my current language ?

7
Tuxxic (talkcontribs)

Hi,

I am using Translate to translate my category pages, therefore there are many pages added to them.

My goal is to display on my category page only the pages containing the language code I am using, for instance "Page title/en" should only be displayed on English version of my category page.

Is it possible to do it ?

Nikerabbit (talkcontribs)

You can leave the category inside <translate> tags and change it in translations. Or you can leave it outside <translate> tags and use something like [[Category:Name{{#translation}}]] magic word to automatically append language code of the translation page (and none for source page).

Tuxxic (talkcontribs)

For people who would read this as a means of help, the right tag to use is {{#translation:}} (see https://phabricator.wikimedia.org/T148029 )

Thanks a lot @Nikerabbit

Tuxxic (talkcontribs)

Thanks, but how can I display translated page name instead of Name/en ? Is it possible using MsCatselect, another plugin I use for selecting categories ?

I want to use MsCatSelect to do category selection, so I put the categories out of <translate> tags.

I have so many questions lately, sorry @Nikerabbit, maybe one day I will help you with the code :)

Nikerabbit (talkcontribs)

At the moment it's not possible in MediaWiki core to display translated page names in category listings.

Tuxxic (talkcontribs)

OK, I can stop searching :) Thanks for advice !

This comment was hidden by Tuxxic (history)
Reply to "Is it possible to hide category pages not in my current language ?"

How can I add "Special:MyLanguage" on all category links ?

1
Tuxxic (talkcontribs)

Hello,

I am searching to add "Special:MyLanguage" in front of all my category links. I know I have to hook some functions, I searched and it seems that Manual:Hooks/OutputPageMakeCategoryLinks can be a good candidate to modify those links.

Can you please help me on writing a hook I can add to my LocalSettings.php ?

Thanks in advance.

Reply to "How can I add "Special:MyLanguage" on all category links ?"

change default language for a page different to wiki default language

4
89.14.26.108 (talkcontribs)

My Wiki is a german wiki. I write a german page and i can translate pages to other languages and it works fine.

But what if i start to write an english article first and i want to translate it into german ? How do i do that ?

When i go to edit it says on top "this is a translation from the german page". Even if i choose "translate to german" then the page is default shown in english.

if i put the /de at the end of the url , i can see the german content

but page loads default without any /<language>

How can i change the default language page individually ?

my e-mail kristijan80 (at) web.de and the wiki page is http://wiki.yunity.org/index.php/Foodsharing_Transfer_Open_Issues

I don't understand where i can ask for help in a very efficient way.

regards

Kristijan Miklobusec

Halibutt (talkcontribs)

I have a related question, I have a Polish language page on outreach wiki and I would like to translate it to English and perhaps a couple other languages. Yet when I mark the page for translation, the system automagically assumes it's in English and I can then "translate it" to Polish. The page is at the moment at outreach:Education/Ideal workshop/pl.

Anyone? I tried the IRC, I looked everywhere, but to no avail so far.

Halibutt (talkcontribs)

Note: cross-posted the question at Topic:Tb3xr7ayjsvgrs45

Halibutt (talkcontribs)

It seems there is no way to do this, per Topic:Tb3xr7ayjsvgrs45... :/

Reply to "change default language for a page different to wiki default language"
Macofe (talkcontribs)

This is a bit strange. I can translate and modified existing translations, but I can't mark translations as reviewed because it says that my session is closed. But it isn't. Proof ot this is that my translations in the same browser, in the same session, at the same time are saved with my username. I tried closing and opening again my session, but it didn't work. I tried Chromium, Chrome and Iceweasel (Firefox in Debian).

I can't say exactly when this started happennig. Maybe a week or two. Before that, I had no trouble.

Let me know if more information is needed.

Update: I didn't specified the site: it's right here in www.mediawiki.org. I have no trouble in meta (see today log)

Update 2: This also happend to me in translatewiki.net. Could it be the translate extension version?

Update 3: It's already been MediaWiki:Tux-session-expired_shown_when_Reviewing_a_message_44515 reported in translatewiki.net by other users.

Reply to "Can't mark translations as reviewed"

api error "nomessagefortitle" (2016.04)

5
Andreas Plank (talkcontribs)

Hi,

I upgraded to the new translate extension 2016.04 from the language bundle, but it does not translate new pages:

What is wrong here? I used already a simply set up but it does not change the behaviour.

  • Any hint or solution?
  • a configuration problem?

In 2016.01 I had no such problems

Regards Andreas

Nikerabbit (talkcontribs)

Please check whether emptying the JobQueue fixes this error. You can run jobqueue with php maintenance/runJobs.php in the mediawiki installation directory.

Andreas Plank (talkcontribs)

Thanks. Running php maintenance/runJobs.php helped indeed. Is this documented anywhere to check runJobs in that case?

Nikerabbit (talkcontribs)

Manual:Job queue should help you to set up job queue so that jobs are processed with low delay. Perhaps this should be better highlighted in the Translate extension configuration page?

Andreas Plank (talkcontribs)

Perhaps this should be better highlighted in the Translate extension configuration page?

Yes, I agree
Reply to "api error "nomessagefortitle" (2016.04)"
This comment was hidden by ClemFlip (history)
Reply to "Allow users to edit translated pages"
LeGiangAnh (talkcontribs)

Hi,

I followed the guideline and translated the main page to Vietnamese.

However when I switched to Vietnamese language, I cannot see translated text. There is only English one.

Any one please help me.

213.208.149.68 (talkcontribs)

same problem for me!!

Nikerabbit (talkcontribs)

Did you use the unstructured element translation guide? An action=purge might be needed on the main page in that case.

Clementflipo (talkcontribs)

Make sure you added <languages /> at the top of your page.

Reply to "Cannot see translated content"