Skin Tooltips i18n

About usage, announcement and development of skins for VLC
vivek
New Cone
New Cone
Posts: 4
Joined: 09 Jul 2007 21:17

Skin Tooltips i18n

Postby vivek » 09 Jul 2007 21:30

Hi All,
I have been doing some translations for the VLC player in the Hindi Language. I recently tried some skins and loved them. They could make the interface more intuitive, and would be particularly helpful for the target audience in Hindi.

However, i noticed that my translations were not appearing for the tooltips, although some of them were present in the latest vlc.po file and I had translated them. Digging further, I found that these tooltip english strings were actually defined in the theme.xml file.

of course, i can copy a theme file, and them replace such strings with the strings in language A, but whats the proper way, and why is it not handled in a more re-usable manner?

Unless all skin creaters want/prefer to do it XML somehow, I think following is required?
1. Skin creaters agree to a fixed set of tooltip strings corresponding to each action.
2. VLC code has proper calls to gettext() for any text being displayed from skins, and includes this "agreed list of skin strings" in the vlc pot file.

What do you guys think?
Cheers,
Vivek

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: Skin Tooltips i18n

Postby dionoea » 10 Jul 2007 10:05

Sounds like a good idea to me. ipkiss?
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Re: Skin Tooltips i18n

Postby ipkiss » 10 Jul 2007 23:13

Yes, good idea. All the "common" strings could be documented and made translatable, so that skin designers tend to use them.
Of course, there are still some untranslatable things, like the skin name (but in my opinion this is not a big deal), plus the other skin-specific strings a designer may want to use (for menus or whatever).

I have very little free time these days, but if people on this forum agree on some list of strings, I can try to have them integrated in the .po files, and to add the gettext() calls in the appropriate places.

vivek
New Cone
New Cone
Posts: 4
Joined: 09 Jul 2007 21:17

Re: Skin Tooltips i18n

Postby vivek » 20 Jul 2007 23:05

I have very little free time these days, but if people on this forum agree on some list of strings, I can try to have them integrated in the .po files, and to add the gettext() calls in the appropriate places.
I can extract the strings used in some of the skins available for download, and create a .pot file out of it. If we see too many similar strings repeated, we can take a count which ones are more popular etc. (probably use some xslt etc)

I can also assist with testing this out. This should be a simple enough change, but i dont have the full vlc cvs/dev environment etc setup to carry this out, nor do i have any clue of the vlc code.
Of course, there are still some untranslatable things, like the skin name (but in my opinion this is not a big deal), plus the other skin-specific strings a designer may want to use (for menus or whatever).
Yes, the skim names can be tricky to implement as easily as the rest. (and probably not very high priority like the main UI). Unlike tooltip action texts, we dont know beforehand what skins may be developed in future, so its certainly not a .po file translation.

Going forward, one way could be (to take a hint from how this is solved in other "plugin" scenarios)

instead of
<ThemeInfo name="A Skin for " author="Anton" webpage="http://anton.sectorhost.org"/>

We can have a (backward compatible) provision for this info in other languages.

<ThemeInfo name="A XXX Skin for vlc" author="Anton" webpage="http://anton.sectorhost.org">
<name xml:lang="en_US">"A XXX Skin for vlc"</name>
<name xml:lang="fr">Une XXX skin pour vlc</name>
<name xml:lang="hi">वीएलसी के लिये ससस स्किन</name>
</ThemeInfo>

Of course, the code would need to search for any such names for the current locale and give them precendence over the default names.

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Re: Skin Tooltips i18n

Postby ipkiss » 21 Jul 2007 11:08

I can extract the strings used in some of the skins available for download, and create a .pot file out of it. If we see too many similar strings repeated, we can take a count which ones are more popular etc. (probably use some xslt etc)

Just keep the skin designers in the loop, because it is a good opportunity to do a tooltip strings review.
Yes, the skim names can be tricky to implement as easily as the rest. (and probably not very high priority like the main UI). Unlike tooltip action texts, we dont know beforehand what skins may be developed in future, so its certainly not a .po file translation.

Going forward, one way could be (to take a hint from how this is solved in other "plugin" scenarios)

instead of
<ThemeInfo name="A Skin for " author="Anton" webpage="http://anton.sectorhost.org"/>

We can have a (backward compatible) provision for this info in other languages.

<ThemeInfo name="A XXX Skin for vlc" author="Anton" webpage="http://anton.sectorhost.org">
<name xml:lang="en_US">"A XXX Skin for vlc"</name>
<name xml:lang="fr">Une XXX skin pour vlc</name>
<name xml:lang="hi">वीएलसी के लिये ससस स्किन</name>
</ThemeInfo>

Of course, the code would need to search for any such names for the current locale and give them precendence over the default names.
This way of translating is a pain, because it involves modifying the skin every time a new translation is added...
What's more, I am not sure that we _want_ the name of the skin to be translated. It is like a brand, somehow.
Anyway, we should focus on the tooltip-like strings first, we can see later for the rest...

vivek
New Cone
New Cone
Posts: 4
Joined: 09 Jul 2007 21:17

Re: Skin Tooltips i18n

Postby vivek » 22 Jul 2007 04:24

as promised, I have created a .pot file from strings i extracted from several theme.xml files.

I used a very simple xslt for this, I was unable to unzip all the theme files on my machine, so we need to apply the same to ALL major themes (btw, udeluxe theme had strings in german, so excluding them)

Whom do I submit my merged .pot files to?

p.s. i used the following xslt, pls let me know if there are any strings that should be translated and shall be missed by this.
==
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">
<xsl:output method="text"/>
<xsl:template match="Theme">
# strings from <xsl:value-of select="/Theme/ThemeInfo/@name"/>

<xsl:for-each select="//@tooltiptext">
msgid "<xsl:value-of select="."></xsl:value-of>"
msgstr ""
</xsl:for-each>
<xsl:for-each select="//@tooltiptext1">
msgid "<xsl:value-of select="."></xsl:value-of>"
msgstr ""
</xsl:for-each>
<xsl:for-each select="//@tooltiptext2">
msgid "<xsl:value-of select="."></xsl:value-of>"
msgstr ""
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
====

CloudStalker
Big Cone-huna
Big Cone-huna
Posts: 2581
Joined: 14 Jan 2007 19:00
VLC version: OVER 9000!!!
Operating System: It's...blue screen
Location: Heaven? No no. What's that other place that starts with an "H"? Oh yes: Home. ^_^

Re: Skin Tooltips i18n

Postby CloudStalker » 22 Jul 2007 04:44

Hmm. If my idea works... you might be useful... we'll see. 8) Hey, do you fully understand VLC code, or at least the skins potion?

vivek
New Cone
New Cone
Posts: 4
Joined: 09 Jul 2007 21:17

Re: Skin Tooltips i18n

Postby vivek » 22 Jul 2007 16:53

Hmm. If my idea works... you might be useful... we'll see. 8) Hey, do you fully understand VLC code, or at least the skins potion?
not really mate.. sorry :(

i was merely doing some translation work for vlc, when i stumbled upon this one. I am more of an enterprise java/database developer, and am very rusty on my c/c++, which i have hardly used in past 6-7 years. have not looked at vlc code either.


Return to “Skins”

Who is online

Users browsing this forum: No registered users and 10 guests