Wiki navigation / translation

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Wiki navigation / translation

Post by renatorivo »

Yinameah wrote:Any opinion for my main page idea ?
sorry, for me it's too invasive,

the best position is in the sidebar, see Wikipedia.
Since we are not able to do this, I think that it is enough a link to a page, even in an existing page, where explain how it works, the result would be similar to this:
Attachments
LanguagesIstruzioni.png
LanguagesIstruzioni.png (20.08 KiB) Viewed 3002 times
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Wiki navigation / translation

Post by yorik »

We certainly need to do something to change the current homepage... But it's hard, we discuss that all the time, and can never come to a consensus :)

The wikipedia system uses something they call "interwiki" (each language is actually a different wiki).. Her it's not the case, and I don't think it's possible to have automatic stuff in the sidebar, but I might be wrong.. I'll check...
User avatar
Yinameah
Posts: 46
Joined: Tue Feb 10, 2015 2:00 pm
Location: Fully, Wallis, Switzerland

Re: Wiki navigation / translation

Post by Yinameah »

Yes, you're right, renatorivo, it makes it invasive. But on 1 page instead of all, and solve the problem.
What you propose as a big disadvantage : you have to be able to read a little of English to have the information about translation... which is not very logical.

The first navigation goes this way : http://www.freecadweb.org. Click on the flag on the top for your language. Click on "read more". Read a little on About_FreeCAD. Is in your language. If you read to the bottom, maybe you understand. BUT it is really likely you just read across a little, and jump to left menu, maybe get attracted by "first steps". Click on it, it's in English. Click on main page, it's in english. First thought ? Only a few pages is translated !!

Yeah, I check the way wikipedia does. Working much better on each language, but exit translation module. Much more difficult to maintain the same information across different languages. Not cool for documentation.

I'm sure you can do lot of thing with the sidebar ! I just found the wiki version, I'll install a local version and experiment a little. Sure I will found a way.


That being said, left panel doesn't solve everything. You browse across your language pages. Everything alright. Then there is an untranslated page. It's in English, and the next links are too !! If you didn't understand the bottom link thing, you're doomed. :lol: Seriously, It seem incredible to me now that someone may not be able to see this bottom ribbon. But really, I had to ask in the forum to understand myself. Once you know, of course, it's clear... But for new ones...

Anyway, I will think and come back with a new idea. 8-)
Aurélien
drei
Posts: 479
Joined: Sun May 11, 2014 7:47 pm
Location: Mexico
Contact:

Re: Wiki navigation / translation

Post by drei »

Sorry for necro-bumping, but the idea seems related to the issue:
How about we use some code to determine a default landing page according to the visitor's ip? As in: visiting from France? send to the French page; Mexico-> Spanish, etc.
Not sure how complicated it may be, but it might help those that do not understand English all that well.
An example is what Google's or Youtube's landing pages do if you are not signed in.
Need help? Feel free to ask, but please read the guidelines first
User avatar
Yinameah
Posts: 46
Joined: Tue Feb 10, 2015 2:00 pm
Location: Fully, Wallis, Switzerland

Re: Wiki navigation / translation

Post by Yinameah »

It could be an idea, but seem quite complicated to integrate this to the wiki system. (Or maybe it exists already as a plug-in ? Or It could be coded as a plug-in ?)

I'm still convinced that the ULS already implemented on the top of the page is the right way to go. I did found how to translate the left menu, but haven't found how to make them target the right translation/sub-page.

I'm still making tests with MediaWiki on a local server, I'm confident there is a way, already discovered some interesting hints on the manual of Wikimedia, although not totally satisfying. But I have been quite busy these days... Maybe next week will be better ...


PS : Can someone explain to me why the wiki's urls are in the form http://www.SITE/index.php?title=PAGENAME instead of the traditional http://www.SITE/wiki/PAGENAME ?
PS2 : The wiki is slightly outdated in comparaison with the latest release of MediaWiki. I hope It doesn't change too much...
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Wiki navigation / translation

Post by yorik »

Yinameah wrote:The first navigation goes this way : http://www.freecadweb.org. Click on the flag on the top for your language. Click on "read more". Read a little on About_FreeCAD. Is in your language. If you read to the bottom, maybe you understand. BUT it is really likely you just read across a little, and jump to left menu, maybe get attracted by "first steps". Click on it, it's in English. Click on main page, it's in english. First thought ? Only a few pages is translated !!
The homepage is not part of the wiki, it is a static html page. So far, very few users offered to help with translating it. Indeed, inside that page, the links to the wiki should all be translated (ex. on the french page, all wiki links should go to /fr pages). This was not always done properly.

About the ULS, indeed I never managed to make it work "correctly" (something like, you should french, all pages you visit should switch to french). I don't really know if it's the intended behaviour.
Yinameah wrote: PS : Can someone explain to me why the wiki's urls are in the form http://www.SITE/index.php?title=PAGENAME instead of the traditional http://www.SITE/wiki/PAGENAME ?
I wasn't aware of that... Not sure what needs to be done here
Yinameah wrote:PS2 : The wiki is slightly outdated in comparaison with the latest release of MediaWiki. I hope It doesn't change too much...
I know, already spent many hours trying to upgrade, but there was something on our web host that prevented it. I'll try again.
User avatar
Yinameah
Posts: 46
Joined: Tue Feb 10, 2015 2:00 pm
Location: Fully, Wallis, Switzerland

Re: Wiki navigation / translation

Post by Yinameah »

Yorik wrote:About the ULS, indeed I never managed to make it work "correctly" (something like, you should french, all pages you visit should switch to french). I don't really know if it's the intended behaviour.
Unfortunatly, I think the answer is no. If I understood it correctly, ULS and translation module are two separated projects, and the integration is not done by a long shot. Maybe someone is working on it as we speak...
Fore the time being, the best option is to make ULS change the left menu (already doable), AND target the right pages. Not perfect but already giant step. I search.... Next week, I hope :cry:

For the /wiki/PAGENAME, there is maybe some option in installation.... Or the version difference... Doesn't seem too problematic. I was just curious.
Yorik wrote:I know, already spent many hours trying to upgrade, but there was something on our web host that prevented it. I'll try again.
For all I now, we speak about minor updates. No absolute necessity to spend time on upgrading... Unless I found a new function who translate all pages automatically or that allow the wiki to toast bread. In that case, I will strongly recommend you to upgrade asap. :D
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: Wiki navigation / translation

Post by piffpoof »

drei wrote: How about we use some code to determine a default landing page according to the visitor's ip? As in: visiting from France? send to the French page; Mexico-> Spanish, etc.
As someone who works in one spoken language on hardware from a 2nd language area in the geographical area of a 3rd language, such 'automatic' behaviour can be a nightmare. Generally the websites that try this which have national flags (to represent the languages) somewhere to switch to the language you want (as opposed to what the fortune teller reading your IP address thinks you want) provide some hope as you can start clicking flags until you can interact with the software. But where there are no flags, or they don't work properly, it's a nightmare. In fact a number of machines at work are so confused (in a Tower of Babel fashion) that I can't use them. A lot of people think their country has the same name everywhere but this is not so. In fact some of the names given to other countries are a bit mind boggling when you first hit them, sometimes I don't know which area they refer to. So any website that depends on text (not to mention character set) to switch language is a big problem.

It's a problem that sounds easier to solve than it is. Even a company like Google can get it screwed up. A lot companies I actually have to get the phone out and call them as their website will not interact with me in a language of my choice because they configure the interaction based on IP address. Yet when in a different IP zone the website is happy to deal with me in an agreeable language.

We're this to happen with FreeCAD it would simply shut out certain users.
drei
Posts: 479
Joined: Sun May 11, 2014 7:47 pm
Location: Mexico
Contact:

Re: Wiki navigation / translation

Post by drei »

Perhaps a less invasive option would be to implement something like the forntpages for Coolermaster or Fractal Design.

The first one has a dedicated landing page so visitors can select their country/language of preference. This is similar to the current setup, not sure if we would like to redesign it.

The second one has a small section with the current language and a dropdown menu to select other available languages. Assuming we set each language to be read by native speakers, the dropdown menu could result useful (e.g. Spanish read as Español, Japanese in the corresponding symbology, etc.)
Need help? Feel free to ask, but please read the guidelines first
User avatar
Yinameah
Posts: 46
Joined: Tue Feb 10, 2015 2:00 pm
Location: Fully, Wallis, Switzerland

Re: Wiki navigation / translation

Post by Yinameah »

Yeah ! I found a way to do everything better. It's long and a bit technical and represent some admin work, but I think it is worth the effort. Follow the guide :

I first went with this, and I suppose someone did the same as MediaWiki:Sidebar-messages exists. But if you want the target to change as the user as selected a language, you have to use magic word {{int:KEYWORD}}, who will try to translate KEYWORD according to ULS choice.

The complete procedure is the following :
1) Modify Mediawiki:Sidebar and make the links look like ** {{int:sidebar-faq-target}}|sidebar-faq

2) Go to Mediawiki:sidebar-messages and add the two keywords to the page. This step require first some new lines in LocalSettings.php (which I assume has already been done as I said earlier, otherwise I suppose the page wouldn't exist).
I suppose it is no recommended to have the same keyword several time in the page.

3) The link targets now an error page, as "sidebar-faq-target" has no translation yet. You have to go to Mediawiki:sidebar-faq-target, create a new page, and write the name of the page, in our exemple FAQ. Then go to Mediawiki:sidebar-faq and do the same.
Of course, the first must be well written, as you would write it after *index.php?title=* for url access. For the second, you can write what you want to be displayed in the menu.

4) Now, the administrator is no longer needed, and usual translators can acces the string via Special:translate or more specifically Special:translate/wiki-sidebar. There you will see our two strings. You need to click on the message to be sure to distinguish the two, as the original message name is displayed on the top of each row, but only when selected.
And here is the final trick : "sidebar-faq" will be translated as "Questions fréquentes" and "sidebar-faq-target" as "FAQ/fr", for the french exemple. Of course, the translator should NOT point to FAQ/fr if the page isn't translated at all. But everything goes well if you translate the first string, then replace the second with itself.

Note that the step 3 really matters, because it gives a default behavior. If you go directly with translation, and a user select a language who hasn't been translated, all the links will appear as dead.
The hack has also the drawback that you have to know the trick in order to translate the "sidebar-PAGENAME-target" messages correctly. But as you have to know the Special:translate link to go there, it seem reasonably safe to me.
At last, it is clear that it doesn't affect inside page links, so it doesn't change a thing if you cross an untranslated page as browsing, but it's already a huge improvement, I think.

Of course, I am volunteer to do the changes if no administrator has time to do this, but I will need the rights to modify the Mediawiki: pages. In any cases, I propose to take some time to explain the translation procedure in the Help_FreeCAD page.


And now, I think I deserve some sleep. ;)
Post Reply