Italian Translation

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
maegras
Posts: 16
Joined: Thu Nov 18, 2010 12:27 pm
Location: Tivoli - Roma [IT]

Re: Italian Translation

Post by maegras »

both? not the title neither the menu?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Italian Translation

Post by yorik »

Well no... Both would be possible if we could make some tweaks to the wiki and install plugins, but sourceforge doesn't allow it...
User avatar
maegras
Posts: 16
Joined: Thu Nov 18, 2010 12:27 pm
Location: Tivoli - Roma [IT]

Re: Italian Translation

Post by maegras »

ok.. no problem
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Italian Translation

Post by NormandC »

BTW just something I came up last night that may interest you maegras.

In the pages describing tools (Part_Box, Part_Sphere, Part_Fuse, etc.) when you translate the page the new page name is Part_Box/fr or Part_Box/it, and this name is used in the description box at the right.

I didn't translate the page name or did a redirect, but I managed to at least translate the tool name in the "description box" (don't know how to call it) as shown in this screen cap:
fc_bool.jpg
fc_bool.jpg (18.36 KiB) Viewed 3111 times
If you want to do the same, here's how: first create a GuiCommand/it template and copy-paste, then translate the content of the GuiCommand template below:

Code: Select all

{|class="wikitable ct" width=100% height=100% style="float: right; width: 200px;" |
  | class="ctTitle"|
=== [[Image:{{{Name}}}.png|32px]] {{{Name/it}}} ===
  |-
  ! class="ctOdd"|Menu location in Italian
  |-
  | class="ctEven"|{{{MenuLocation}}}
  |-
  ! class="ctOdd"|Ambiente
  |-
  | class="ctEven"|{{{Workbenches}}}
  |-
  ! class="ctOdd"|Default shortcut in Italian
  |-
  | class="ctEven"|{{{Shortcut|None}}}
  |-
  ! class="ctOdd"|See also in Italian
  |-
  | class="ctEven"|{{{SeeAlso|None}}}
  |-
  | class="ctToc"|<br/>__TOC__
|}
[[Category:User Documentation/it|!]]


[[Category:Command Reference/it]]

<noinclude>
==Usage==
This Template is the main anchor on documenting GuiCommands.
<code>{{GuiCommand/it|Name=TestCommand|Name/it=TestCommand/it|Shortcut=Ctrl+X|Workbenches=Wb1,Wb2}}</code>
</noinclude>
And where you see "None" you should replace by the Italian word.

Yorik will notice that I added the new Name/it variable (Name/fr in my case) in the template to separate the name of the png icon from the name of the tool. It's kind of a hassle to add this but less so than copying each and every icon in the wiki and giving them new names!

Then for example in the boolean operations tool page, here's what you'll put at the top:

Code: Select all

{{GuiCommand/it|Name=Part_Booleans|Name/it=Operazione booleana|MenuLocation=Parte -> Operazione booleana...|Workbenches=[[Part Module/it|Ambiante Parte]], Complete|SeeAlso=[[Part Fuse/it | Unione ]], [[Part Common/it | Intersezione]] e [[Part Cut/it | Sottrazione]]}}
You must leave the Name variable the same as the English page or the icon won't be recognized.

And you may check on these Italian translations I made, they come from Google so... ;)

Hope this helps! Arrivederci! :D
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Italian Translation

Post by yorik »

Hmm, cool trick!

I just had an idea of something we could try, is to force the page title with =Page Title= then hide the original one with css... I'll do some experiments.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Italian Translation

Post by yorik »

Okay I think I found a cool way. Look at this:

http://sourceforge.net/apps/mediawiki/f ... artpage/it

Basically I made a CSS rule that masks the page title on all pages ending with "/it". So you must manually add this at the top of your pages:

Code: Select all

= Benvenuti =

__TOC__
To all of your pages. The __TOC__ is necessary too otherwise the table of contents will go above the title... Tell me if you like, I can extend to other languages too...
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Italian Translation

Post by NormandC »

Nice! What about /fr pages? :P

Edit: Am I wrong or does it brake the docnav links? :?
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Italian Translation

Post by NormandC »

Yeah, this trick actually breaks the docnav links, but it's easy to repair, just put double brackets on the page names like this (I made the change to the Online_Help_Startpage/it page):

Code: Select all

{{docnav/it|[[Online Help Toc/it]]|[[About FreeCAD/it]]}}
It's more trouble (unless using redirects links of translated pagenames would work?*), but the title page can be translated which is a big plus! Decisions, decisions... I'm gonna sleep on it and tell you tomorrow if I'd like to have the same CSS exclude on /fr pagenames suffix.

*On the other hand, I like what maegras did in the docnav of the Feature_list/it page, which is this:

Code: Select all

{{docnav/it|[[About FreeCAD/it|Informazioni su FreeCAD]]|[[Install on Windows/it|Installazione su MS Windows]]}}
It's a lot more to type, but then there is no redirect page to deal with, which I believe makes it faster, and easier to manage (smaller amount of pages in the wiki).
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Italian Translation

Post by NormandC »

Just noticed the edit link at the right of the Bienvenuti title (only the brackets are visible as the "Edit" text is blue). Meh, not a big deal (you must have edit rights to see this I presume).

I'm leaning toward excluding the /fr suffix in the CSS, even if it's gonna require me to change all the pages done already (thankfully not that many).
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Italian Translation

Post by yorik »

The docnav/it problem is because it has been changed so you can insert [[pageName|translatedPageName]] in it (on the normal template you just insert the pageName and the template turns it into a link), but i think not all pages were updated to use it.

About the title trick, sure, we can do it for fr pages too! We'll need to update all pages to add a title, then. But I think it works fine!
I fixed the blue on blue link too.
Post Reply