MX Adriatic Blue & MX Red Diamond

niglou

BH Lover
Hello Matrix10,

In all your skin.xml, you call for the title of the screen a widget named "Title" like that :

widget source="Title" render="Label"........

As I would like to try to make it translatable, which is not the case now, could you please tell me where is located the python file "Title" you are calling ? I did never find it.....Does it really exist ?
 

Matrix10

Administrator
Hello Matrix10,

In all your skin.xml, you call for the title of the screen a widget named "Title" like that :

widget source="Title" render="Label"........

As I would like to try to make it translatable, which is not the case now, could you please tell me where is located the python file "Title" you are calling ? I did never find it.....Does it really exist ?

If that does not exist, then you will not have any Title in the skin.
 

niglou

BH Lover
If that does not exist, then you will not have any Title in the skin.

Yes, but you did not tell me WHERE is the python file matching with widget "Title"

It seems only working if the screen is present in Menu.xml (/usr/share/enigma2/)..... every stuff not present here return not translated.
May be you could use text labels like Army does, therefore provided we add them in the .po file, all your screen titles will be translated.
 

Matrix10

Administrator
Yes, but you did not tell me WHERE is the python file matching with widget "Title"

It seems only working if the screen is present in Menu.xml (/usr/share/enigma2/)..... every stuff not present here return not translated.
May be you could use text labels like Army does, therefore provided we add them in the .po file, all your screen titles will be translated.

Look in Meny.py

Im sorry but I really do not intend to use
text labels.It is not correct coding for Title/title

Do you you manage to translate " title" ???
 

Matrix10

Administrator
Yes, but you did not tell me WHERE is the python file matching with widget "Title"

It seems only working if the screen is present in Menu.xml (/usr/share/enigma2/)..... every stuff not present here return not translated.
May be you could use text labels like Army does, therefore provided we add them in the .po file, all your screen titles will be translated.

Now I looked

Croatian language is translated correctly i all Menu Panels ( and in the majority of the panels)
then is not a problem in the skin coding,but in the translation and maybe in image coding
for some panels.Suppose for some panels I can put a name xxxxx
but the name will not be displayed but the name that is in the image coding.
It is an advantage for title coding instead label coding.
I the label you can put any name
but then it will be not translated, if not in accordance with image
coding on one side and the translation on the other.
For comparison Title (Glavni izbornik >>> Main menu) in Default skin is not translated into Croatian language ,
I think, because of these labels.

So I do not know what is your problem then ???


shot1.jpg






shot1a.jpg
 

niglou

BH Lover
Hello Master,

To highlight what I am speaking about, try to select French as language on your receiver.
You will see that Army skin is totaly translated.
Your skins are only partly translated : Every stuff coming from "official" image is ok plus the shutdown menu (it is ok because every thing is present in the file menu.xml). If you try to go on any black kole menu, you will see that all the screen titles remain in English.
 

Matrix10

Administrator
Hello Master,

To highlight what I am speaking about, try to select French as language on your receiver.
You will see that Army skin is totaly translated.
Your skins are only partly translated : Every stuff coming from "official" image is ok plus the shutdown menu (it is ok because every thing is present in the file menu.xml). If you try to go on any black kole menu, you will see that all the screen titles remain in English.

I'm not sure that's a correct way to code skin
and the use of double coding for panel titles.
We have already discussed abt this problem.

For now, I have no intention to change
until they are clear rules.

So we need to make a decision where is what changed and how
inside image , skin or both
not that we have three different situations .

I will start again this question
but not now because we have some other important stuff.
 

Matrix10

Administrator
Example

<screen name="LanguageSelection" position="0,0" size="1280,720" title="Language selection" flags="wfNoBorder">
<widget source="session.VideoPicture" render="Pig" position="640,160" size="560,330" zPosition="3" backgroundColor="#ff000000"/>
<ePixmap pixmap="MX_Reddiamond/menu/b.png" position="0,45" size="1280,32" zPosition="-1" alphatest="on"/>
<ePixmap pixmap="MX_Reddiamond/menu/b.png" position="0,648" size="1280,32" zPosition="-1" alphatest="on"/>
<ePixmap pixmap="MX_Reddiamond/menu/tv2.png" position="615,139" size="610,370" zPosition="-1" alphatest="on"/>
<ePixmap pixmap="MX_Reddiamond/menu/scann.png" position="1155,535" size="65,65" zPosition="-1" alphatest="on"/>
<ePixmap pixmap="MX_Reddiamond/menu/arrow1.png" position="60,640" size="32,50" alphatest="blend"/>
<ePixmap pixmap="MX_Reddiamond/menu/ok.png" position="1180,653" size="36,25" alphatest="blend"/>
<ePixmap pixmap="MX_Reddiamond/menu/exit.png" position="1180,54" size="36,25" alphatest="blend"/>
<ePixmap pixmap="MX_Reddiamond/menu/language.png" position="50,35" size="65,65" alphatest="blend"/>
<ePixmap pixmap="MX_Reddiamond/menu/hd.png" position="606,650" size="67,30" alphatest="blend"/>
<widget source="Title" render="Label" position="300,40" size="680,50" zPosition="1" halign="center" font="Regular;42" backgroundColor="backm" transparent="1"/>
<ePixmap pixmap="MX_Reddiamond/menu/scroll.png" position="578,140" size="22,468" zPosition="5" alphatest="blend"/>
<widget source="languages" render="Listbox" position="60,140" size="540,468" scrollbarMode="showNever" enableWrapAround="1" selectionPixmap="MX_Reddiamond/menu/button540x50.png" transparent="1">
<convert type="TemplatedMultiContent">
{"template": [
MultiContentEntryText(pos = (100, 10), size = (420, 30), flags = RT_HALIGN_LEFT, text = 1),
MultiContentEntryPixmap(pos = (10, 4), size = (60, 40), png = 2),
],
"fonts": [gFont("Regular", 25)],
"itemHeight": 52
}
</convert>
</widget>
</screen>

Is correctly translated and use <widget source="Title" render="Label" the same as in example Blue Panel .Which is not translated.
 

niglou

BH Lover
Yes Matrix10, but language selection is a part of "official"image" and therefore properly translated.
I did select Croatian language, and I see, as in French the Screens titles are stiil in English with black hole menus :

eg : Black Hole Settings, Black Hole Blue Panel ..... and so on.

I might be wrong but I am pretty sure the widget "Title" looks if it can find the screen tiltle into menu.xml, then the title will be returned translated, and if not present then it is the title name you gave in your skin.xml which will be returned, but as a static text not translated.

You can easyly play to confirm that :
If you change the title in your skin xml on first line of a sceen like :
<screen name="LanguageSelection" position="0,0" size="1280,720" title="Language selection" flags="wfNoBorder"> Replace "Language selection" by "BlaBlaBla"
The title on the TV will still be "Language selection" translated into your language,
But if you do the same for "Black Hole Blue Panel", the return on your TV will be "BlaBlaBla"
 

Matrix10

Administrator
But it's a question that I have re-launched
because the problem can be solved
within the image coding or within the skin coding with <eLabel text="bla blaa".

I am not satisfied with this skin solutions
but if it can not be otherwise, and if that's the case, ...
I'm waiting for answer from our Coder.
 

niglou

BH Lover
But it's a question that I have re-launched
because the problem can be solved

I'm waiting for answer from our Coder.

Hello Matrix10

As the coders do not seem higly motivated, I finally did the trick.

The mistake lies in Line 94 of the file "GUISkin.py" located in /usr/lib/python/Components , in "def applySkin(self):" chapter.

I did put in red what has to be added :

def applySkin(self):
z = 0
baseres = (720, 576) # FIXME: a skin might have set another resolution, which should be the base res
idx = 0
skin_title_idx = -1
title = self.title
for (key, value) in self.skinAttributes:
if key == "zPosition":
z = int(value)
elif key == "title":
skin_title_idx = idx
if title:
self.skinAttributes[skin_title_idx] = ("title", title)
else:
self["Title"].text = value and _(value)
self.summaries.setTitle(value)
elif key == "baseResolution":
baseres = tuple([int(x) for x in value.split(',')])
idx += 1
self.scale = ((baseres[0], baseres[0]), (baseres[1], baseres[1]))


I did also extract from your skin.xml 91 strings which need to be added to the language .po file (and translated into each language of course).

Now ALL your skins are translatable !!!

I join here the modified "GUISkin.py" and the list of strings to be added to each translation files.

I hope every one will enjoy your skins finally translated in next image update ;)
 

Attachments

  • GUISkin.zip
    1.3 KB · Views: 38
  • Missing strings skins Matrix10.zip
    1 KB · Views: 25

Matrix10

Administrator
Nice,
but I m not image coder and I do not know if it's all good,
and if the coder will accept as a solution.
I must say that this, at this moment have no priority

because we have some other major works.
But to leave this to Coder, because I do not cod image.
 
Top