Template:GuiCommand: Make 'Name' visible in translated templates?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Template:GuiCommand: Make 'Name' visible in translated templates?
Previously the translated versions of Template:GuiCommand were inconsistent. Some showed both the Name and the Name/xy attribute (where xy is the language code). Others just the latter. When updating these templates recently I decided to make things consistent and now all (except the Russian version which has been updated by a translator in the meantime) only show Name/xy.
Here is a former Italian example showing both Name and Name/it:
https://wiki.freecadweb.org/index.php?t ... did=665202
What is preferable: show Name/xy and Name, or only Name/xy?
Here is a former Italian example showing both Name and Name/it:
https://wiki.freecadweb.org/index.php?t ... did=665202
What is preferable: show Name/xy and Name, or only Name/xy?
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
If the content refers to a specific language, then you can try to omit the language code from the page address.
Except that the address will be inconsistent.
Twórca polskiej wersji Wiki dla FreeCAD, współwórca polskiej wersji GUI.
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
"Cierpliwym być musisz, by wiedzę zgłębiać tajemną, gdyż ciemna strona mocy niszczącą i silną jest".
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
don't see any harm for both being there (which i suppose is what it is today), rather the opposite, makes it clear what is what.
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
Judging from Kaktus's comment the issue is perhaps not completely clear.
Here is a Russian example that hopefully clarifies things:
https://wiki.freecadweb.org/Part_Box/ru
Here is a Russian example that hopefully clarifies things:
https://wiki.freecadweb.org/Part_Box/ru
Code: Select all
{{GuiCommand/ru
|Name=Part_Box
|Name/ru=Куб
|MenuLocation=Деталь → Примитивы → Куб
|Workbenches=[[Part_Workbench/ru|Part]]
|SeeAlso=[[Part_CreatePrimitives/ru|Создать примитивы]]
}}
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
on this example, we have , an extra _.
if it is possible to avoid to copy the Name line followed by XY, I am pro.
in the same idea:
that would be great not to add any /XY behind any link. let's assume, I am translating a Russian page, any links in this page are refering to a Russian page. If the Russian page doesn't exist, well the reader knows it as the link appear in red and in that case he need to switch to the English version.
at the end, a page will show all missing translated pages. Couple times I have made this mistake or find such case by random.
on reverse, today, if I forget to add this /XY, we don't do the difference. for the reader, he jumps on an English page and he can see if the page is translated in his language and click on it. well that's not a big deal but we miss the information about the translation.
Code: Select all
|Name=Part_Box
if it is possible to avoid to copy the Name line followed by XY, I am pro.
in the same idea:
that would be great not to add any /XY behind any link. let's assume, I am translating a Russian page, any links in this page are refering to a Russian page. If the Russian page doesn't exist, well the reader knows it as the link appear in red and in that case he need to switch to the English version.
at the end, a page will show all missing translated pages. Couple times I have made this mistake or find such case by random.
on reverse, today, if I forget to add this /XY, we don't do the difference. for the reader, he jumps on an English page and he can see if the page is translated in his language and click on it. well that's not a big deal but we miss the information about the translation.
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
It does not match how the name is displayed on the original page, although the name in the source code is with an underscore.
That is not possible. To avoid that you would have to accept the English name. That name is used to find the icon.
I do not understand this.
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
I have created an experimental template that may, or may not , work.
Code: Select all
{{AutoTransLink|Draft_Wire|Draft Wire}}
{{AutoTransLink|Adding_a_new_mouse_navigation_option_to_FreeCAD|Adding a new mouse navigation}}
{{AutoTransLink|Does_not_exist|Does not exist}}
You can use this page for testing:
https://wiki.freecadweb.org/Special:ExpandTemplates
- Attachments
-
- AutoTransLink-preview.png (1.97 KiB) Viewed 4012 times
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
hi Roy,
that sounds promising.
I have tried with:
note I made two errors on purpose:
- I have removed the /fr on
- I have cut ng on
the error from Scaling well shows there is an error.
I don't understand the result of Windows_packaging
that sounds promising.
I have tried with:
Code: Select all
{{#language:fr}}
* [[Image:Image_Open.svg|32px]] [[Image_Open|Ouvrir...]]: ouvrir une image dans une nouvelle fenêtre.
* [[Image:Image-import-to-plane.svg|32px]] [[Image_CreateImagePlane/fr|Créer un plan d'image]]: importer une image plane dans la vue 3D.
* [[Image:Image-scale.svg|32px]] [[Image_Scali/fr|Mettre à l'echelle le plan de l'image]]: redimensionner une image importée dans un plan.
[[Windows_packaging|jj]
- I have removed the /fr on
Code: Select all
[[Image_Open|Ouvrir...]]
the result gives: between the English page and French page, both of them appear identical, same color.[[Image_Scali/fr|Mettre à l'echelle le plan de l'image]]
the error from Scaling well shows there is an error.
I don't understand the result of Windows_packaging
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
Code: Select all
* [[Image:Image_Open.svg|32px]] {{AutoTransLink|Image_Open|Ouvrir...}}: ouvrir une image dans une nouvelle fenêtre.
* [[Image:Image-import-to-plane.svg|32px]] {{AutoTransLink|Image_CreateImagePlane|Créer un plan d'image}}: importer une image plane dans la vue 3D.
* [[Image:Image-scale.svg|32px]] {{AutoTransLink|Image_Scali|Mettre à l'echelle le plan de l'image}}: redimensionner une image importée dans un plan.
'''{{AutoTransLink|Windows_packaging|Windows packaging}}'''
- Attachments
-
- context-title.png (1.27 KiB) Viewed 3852 times
Re: Template:GuiCommand: Make 'Name' visible in translated templates?
I've tried again with your advice. Your tool adds the right language extension and put colors to distinguish status of "translated" link.
here are results:
today, there is no French translation for the print "Window packaging". I wonder if it would not be better to put in red. It's only a matter of code color.
I have also deliberatly erased the second part of the link [[a_link|a link]] --> [[a link]] to simulate what happens. There are still writers doing that. What could be interesting is that, even on English pages, if the second part is missing, the print would show what we are seeing on my screenshot. That may be "force" the writer to think about this part.
thank you Roy
here are results:
today, there is no French translation for the print "Window packaging". I wonder if it would not be better to put in red. It's only a matter of code color.
I have also deliberatly erased the second part of the link [[a_link|a link]] --> [[a link]] to simulate what happens. There are still writers doing that. What could be interesting is that, even on English pages, if the second part is missing, the print would show what we are seeing on my screenshot. That may be "force" the writer to think about this part.
thank you Roy