Help talk:Extension:Translate

Jump to navigation Jump to search

About this board

Is it possible to use interwiki links?

1
90.186.253.229 (talkcontribs)

I have 5 different wikis connected with interwiki links. (EN, DE, FR, ES, RU)

Let's say write a page in EN and mark it for translation. Every translation should not be displayed under {PAGENAME}/DE and so on, but the translated pagename under the de.mywiki.de/{PAGENAME}. Is this possible?


If so, then if someone write a page in FR for example and mark it for translation in EN only. After translation into EN, the source page have to be changed to the EN one and the FR page to the translated one. From now on the EN page will be translated to the other LANG Wikis. Is this somehow possible?


Thanks for answering :-)

Reply to "Is it possible to use interwiki links?"
Marlonke (talkcontribs)

Hi,


I was wondering the following:


I have a page with Semantic properties. When I translate this page to another language, the Semantic properties are copied as well. My goal is to ensure that, when the properties are changed in the source page, that they are automatically updated in the translated page as well.


Is there any feature that supports this?

Nikerabbit (talkcontribs)

Can you give an example? If they do not depend on a language, just put them outside <translate> tags and they are automatically copied when page is marked for translation.

Marlonke (talkcontribs)

Thanks for your reply, Nike. We appreciate it. Just to be clear, we're running Semantic MediaWiki.


I have a 'Context' property on a page. When initially creating the translated versions of the page, the property and value of this property ('situation') is copied correctly. However, what we aim for is that, when the value of the property of the source page (if we change the Context property's value to 'role' in the source page source code) - or if a new one is added - that the derived translated page automatically reflect this change as well.


In essence, we want it so that if properties are added, edited or deleted on the source page, it also automatically does this on the translated pages. Consistent semantic properties are a staple of our current work philosophy, and we want our users to have to do as little work as possible.

Nikerabbit (talkcontribs)

Currently translatable pages must be re-marked manually to update translation pages. Perhaps you want to have it possible to automate that.

Not sure if it works in your use case, but I believe if those values could be set via a template, then the same effect could be had by just updating that template.

Marlonke (talkcontribs)

We do use plenty of templates, but they are more akin to categories rather than managers of individual pages. I am probably going to look into automating the process of updating semantic properties whenever properties on a source page are edited. I've looked at some of the hooks of the Translate extension, and I think we can make it work somehow.


Thanks for your time, we really appreciate it.

Reply to "Semantic MediaWiki compatibility"

How to export source and translated pages to another wiki?

6
Rdal (MS) (talkcontribs)

Hello,

I need to transfer pages in source language (French) together with their translated versions (English) to another wiki. When I use the Export Pages feature of the wiki it seems that some information is missing. Is there some additional data that I need to export like for example information in specific mysql tables? Or how would you do it?

Nikerabbit (talkcontribs)

What information is missing? Do you want to transfer them just for reading or actually move them to another wiki permanently and continue translating there?

Rdal (MS) (talkcontribs)

I know the language selector is missing and maybe other things. I need to move them permanently. The Translate extension is installed on both wikis. Is there any info in database tables that is not exported when you use the Export Pages feature?

Nikerabbit (talkcontribs)

There is plenty. But if you just mark the page translatable again on the new wiki, it should get pretty close to the state compared of trying to manually port info from the database tables.

Rdal (MS) (talkcontribs)

Do you mean that if I mark an exported page as "translatable" again on the new wiki, the link between the different translations of the same page will be restored?

Nikerabbit (talkcontribs)

Yes, assuming you also exported the translation units from the Translations: namespace.

Reply to "How to export source and translated pages to another wiki?"

What determines the list of languages into which translation is allowed?

2
PiRSquared17 (talkcontribs)

Sorry if the answer is obvious. I couldn't remember and couldn't find the answer within a few minutes of searching.

I'm not talking about the list of priority/allowed languages you can set for a specific page. I mean the set of languages you can use in general.

Quiddity (WMF) (talkcontribs)
Reply to "What determines the list of languages into which translation is allowed?"

Multilanguage import and translate

5
AssetDenmark (talkcontribs)

I have a 'practical' question, but i am not sure where to put it - please direct me elsewhere if this is not the correct "talk" page…

I setup a new Wiki (V1.30) on a NAS and I want to import all of a old (V1.81) Wiki - located on a PC.

The 'source language' for the wiki is 'da' (Danish), but I want to add en' (English) as an option - so I guess that i need to prepare a bit to get that right…

I have some 2-400 Wiki pages of English text… that I want to import and then translate. For that I need to import the pages to say wiki/n1:whatever/en - but when I translate this, to 'da' ,will that then end up in \whatever\dk or will it go in \whatever… ?

Furthermore - I need to split up these pages into namespaces (like, n1:, n2:, n3:… say I will have a name space like this: wiki/n1:whatever\en

My general questions are:

  • Can I somehow import texts to land in the "correct" place...
    • wiki/n1:whatever1/en
    • wiki/n1:whatever2/en etc.

When i translate from the /en version, where will this end.. and will the Wiki work with a mix of /da, /en and <source language> pages…  what happens if there are the following page combinations at the same time:

wiki/n1:whatever1/en the english page

wiki/n1:whatever1/da page in danish

wiki/n1:whatever1 - standard name for the 'n1:whatever1' page, should also be in Danish

p.s. I did this interface to goggeltranslate at some time in the past. https://www.mediawiki.org/w/index.php?oldid=1351872

Nikerabbit (talkcontribs)

I would do it like this:

  1. Import all English pages into the wiki in a way you want (no language codes in the page names)
  2. Mark them translatable
  3. "Translate" them to English by just copying the source text
  4. Translate the source text page into Danish manually
  5. Re-mark the source page for translation
  6. Mark the English translations as non-fuzzy
AssetDenmark (talkcontribs)

Naturally! Clever.. :-) - could have thought about that, but would I have.. before it was too late?

Than How do I handle the 'da' language tags - the "source languag" will be Danish, so can I simply translate to a page "without" the page name language code? Over time the wiki would probably contain a mix of no-tag, da and en - but can I do anything to prevent that from happening...

I guess I could leave out the 'da' option all together.. but will that create oher issues?

Nikerabbit (talkcontribs)

The system will create /en and /da pages for you. There will be no automatically generated links to /da, because links to that language will point to the page without language code.

AssetDenmark (talkcontribs)

Not done - yet - but now I have a Wiki up, and I am trying to bend my head around the translate bundle!

My challenge, still, that I do have some 200 word documents in uncomplicated English . These should be transferred to a the wiki as-is and then translated into danish.. I just wonder how to do this in some way that will give a simple workflow, and the least amount of work.

Going from @Nikerabbit's idea - still nagging me that I did not think of that - I get to this rough solution:

What if, I can make a few changes to the [[Help:WordToWiki#Word2MediaWikiPlus|Word2Wiki]], so the result is pages that have been marked for translation into 'da' (Danish) and with the page language 'en' (English)... and they will be imported to the Wiki, using the import translations function (probably, if that makes sense?).

So - if the import function works as if an editor did the pages (?: if not so I would need to make a special import!) - the pages should be automatically marked for translation (into 'da'...) ..

I just wonder if either of the import functions would behave like I want it to, or if there is a need to "post-process" the pages.

To spice things up a bit, this all have to end up in a dedicated namespace, I wonder if that will pose some extra challenges?





Reply to "Multilanguage import and translate"

Process for migrating translated pages between wikis?

2
Billinghurst (talkcontribs)

Can someone please explain the process to move a set of translated pages from one wiki to another? There are numbers of templates and translated pages that I wish to bring to wikimaniawiki from meta and the like. The xml import doesn't allow the writing of the Translations: ns. pages, and I cannot tell whether that is a straight permissions issue, or whether it is wanting to see pre-existing files prior to occuring. The export translations function seems to be a one translation in one language at a time process. Help pages don't seem to overtly cover this, or I am completely misunderstanding. Thanks for any direction.

Nikerabbit (talkcontribs)

The XML import should work in case you have first copied the source page(s) and marked them for translation.

Reply to "Process for migrating translated pages between wikis?"

Source page language differs from the wiki language

6
Axdr (talkcontribs)

Wiki language = English

Suppose there is a page LifeOfCats

Special:MyLangauge works like this:

LifeOfCats = English

LifeOfCats/fr = French

LifeOfCats/ru = Russian

If I create a page in Russian, it should obviously be LifeOfCats/ru

When I translate it into English, I want that the parent page LifeOfCats to be created. But there is no such possibility.

If I create LifeOfCats/ru and assign it the language Russian, then the translation into English produces LifeOfCats/ru/en. It is wrong. The English version must be LifeOfCats - the parent page relative to other languages. Only then will the hierarchy of translations and Special: MyLanguage work correctly

Is there an easy way to create pages with a source language different from the wiki language so that they can be translated?

Matěj Suchánek (talkcontribs)
Axdr (talkcontribs)

I solved this problem with "Shaman's Magic Tambourine".

Does it make sense to publish the algorithm here in the discussion?

Matěj Suchánek (talkcontribs)

I'm interested in what that means...

Axdr (talkcontribs)

When the source text is created in another language, there is an algorithm that will help translate it into the main language and at the same time maintain the correct page hierarchy, as well as ensure the proper operation of the Special:MyLanguage links.

Quiddity (talkcontribs)
Reply to "Source page language differs from the wiki language"

Is it possible to disable the split in units?

12
ClemFlip (talkcontribs)

Hi Friends,

I'd like to know if it's possible to disable the auto split in units?

When the page is mark for translation, the system will insert tags like inside the wiki-text.

I'd like to avoid that, so that the entire text inside the <Translate> tag will be translated in one string (Even if there is a hard return inside the <Translate>).

I hope I am clear. Thanks a lot for your help.

Quiddity (WMF) (talkcontribs)

Hi. Could you give us a link to the page you're working on, so that we can understand the use-case/problem you're trying to solve?

And/or, paste the content (or similar) into a sandbox? (Feel free to use User:Quiddity (WMF)/sandboxtranslation).

ClemFlip (talkcontribs)

Hi @Quiddity (WMF), thanks for your quick reply.

Unfortunatly, I can't share a link with you since I am working on a local environment.

However, on the sandbox, if you switch to the wikitext edit mode:

https://www.mediawiki.org/wiki/User:Quiddity_(WMF)/sandboxtranslation?action=edit&veswitched=1&oldid=2493201

You can see that

<!--T:1-->

,

<!--T:2-->

,

<!--T:3-->

,... have been inserted inside the wikitext to split all the content inside <translate> and </translate> into translatable strings (Witch is fine).

However, on my wiki, when I switch to the VE edit mode, I see little grey mark that looks like !T:2 in lieu of the

<!--T:2-->

tag (witch is not very convenient for the user).

On the sandbow, however, those little marks don't seems to show up. Is it something that as been solved in a new version of VE maybe?

---

Another question, is their a way to simply disable the auto split? (so disable the fact that the extension automatically insert

<!--T:1-->

,

<!--T:2-->

,

<!--T:3-->

into the wiki-text)

Thanks a lot.

Quiddity (WMF) (talkcontribs)

Re: Visual editor - no, I'm afraid that editor does not currently support Extension:Translate (which is an old and complicated extension).

Re: merging all "translatable units" into a single unit - I don't think so, beyond using <br> at the end of every line. (Which I strongly advise against) -- The extension is designed to make it easy for various people to do "little bits, one at a time" (So if they get bored or busy, halfway through the work, then at least some of the page is translated); therefor, to have "multiple paragraphs all in a single translation unit" isn't possible (as far as I know, and I cannot think of any other hacks/workarounds to make it do that). Sorry, but hope that helps.

Axdr (talkcontribs)

Re: Re: merging all "translatable units" into a single unit - I don't think so, beyond using <br> at the end of every line. (Which I strongly advise against) -- The extension is designed to make it easy for various people to do "little bits, one at a time"

How to insert a fully translated text to the place of the translated text?

Maybe there is a ready-made fully translated text. In addition, texts for different languages may differ in content and may be they are not a direct translation of one into another.

Quiddity (talkcontribs)

"texts for different languages may differ in content and may be they are not a direct translation of one into another."

This extension is generally intended for direct translations. It is primarily used for keeping multilingual copies of documentation updated.

"How to insert a fully translated text to the place of the translated text?"

Section by section.

Axdr (talkcontribs)

Probably, it is time for you to expand the idea of why a CMS exists. Not only to translate texts in it.

Where do you discuss system tasks?

Quiddity (talkcontribs)
Axdr (talkcontribs)

I think that another extension is needed, which only keeps track of whether there are language-versions of text, and by analogy of the <languages /> tag shows a switch of languages.

Quiddity (talkcontribs)

Links or examples almost always help! They can show other people what you're thinking of, or what you've found that wasn't ideal (and why), or related examples from elsewhere. Your current comments are too short and abstract for me to understand quite what you mean. Please link to or explain the specific use-case(s) that you are thinking of.

Axdr (talkcontribs)

The <languages /> tag works only when the text is translated into other languages with the Translate extension.

But in a situation where the text is not translated, but simply there are other corresponding texts in other languages, the <languages /> tag does not work. But it does need to work.

I think it would be helpful to have a tag capable of displaying a language switch for cases where the texts are not "translated section by section".

Quiddity (talkcontribs)
Reply to "Is it possible to disable the split in units?"

Existing translations must be moved

5
Perhelion (talkcontribs)

I mean this is one of the main reasons why this extension not get wider used, because there is no function to do this simple time consuming work. Normally there exist already around 20 target subpages e.q. on Commons. So it's not fun to use it. Maybe use Extension:Replace Text.

Perhelion (talkcontribs)

PS: Beside the fact we can't move any page under i18n/ if the page /i18n exists (so we must delete them first?).

EDIT: That was a very bad idea from me [[phab:T114592]] (<-- I love this flow)

Nikerabbit (talkcontribs)

It is not clear whether you mean existing non-Translate translations (for that use Special:PageMigration) or renaming pages (use the move action), but both are supported with some known issues.

Perhelion (talkcontribs)

Thanks for answer, there is a serious problem on Template:Mozilla Public License/(after moving, which was unnecessary in my opinion too). I edited the /i18n subpage again to refresh the ext.translate (bot), and now any language got overwritten with English (I guess restoring the "bot deletion" was a very bad idea). I really do not feel like re-entering each language manually. An undo of Move or something would be very good!? PS:Maybe a detailed documentation, what is going wrong here, would be good too.

PS: I trying the Special:PageMigration thing, but I got an JS error on the page (nothing happen). I guess it comes from "mediawiki.searchSuggest" (Uncaught TypeError: Cannot read property 'indexOf' of undefined)

Nikerabbit (talkcontribs)

I'll look into these errors later when I have time. Perhaps there is easy way to restore the translations.

Reply to "Existing translations must be moved"

Requirements for Special:MyLanguage

2
Lyrixn (talkcontribs)

On a wiki project I'm working on, I've had an issue for a while, where Special:MyLanguage doesn't redirect properly and instead shows me someone else's version of a cached/static article.

E.g. if it's a logged out user, it shows me a static of being logged out and if I stumble upon a registered user's static, then it will display me as if I'm logged in as someone else.

Any ideas how to fix this? Because currently I'm unable to utilize Special:MyLanguage as its intended purpose. It's more of a burden, than of help.

Nikerabbit (talkcontribs)

First of all, Special:MyLanguage has been in MediaWiki core for some time. Secondly, it sounds like you have a frontend cache that is not properly configured. I've never seen MediaWiki give out pages intended for some other use.

Reply to "Requirements for Special:MyLanguage"