translate=? (solved)

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
User avatar
doofus-01
Art Director
Posts: 3948
Joined: January 6th, 2008, 9:27 pm
Location: USA

translate=? (solved)

Post by doofus-01 »

Hi,

What needs to go into the .pbl file to set an add-on as translatable? I've tried
  • translate="true"
    translate=true
    translate="yes"
    translate=yes
because of what I read in the wiki and a forum search, but none of those seem to do anything (the add-on still shows "false" on the 1.8 server). Very few of the add-ons show up as "true", so I may not be the only one who is confused.

Thanks.

EDIT: Problem solved with some modifications to wesnoth_addon_manager
Last edited by doofus-01 on December 7th, 2009, 4:41 pm, edited 1 time in total.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
SkeletonCrew
Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: translate=?

Post by SkeletonCrew »

doofus-01 wrote:Hi,

What needs to go into the .pbl file to set an add-on as translatable?
translate="true"
where "true" can also be "on", "yes" or "1" not entirely sure whether the double quotes are needed.
The upload code is the same as Wesnoth 1.6, however the upload is done manually so it can
take some time before the addon is on Wescamp.

Did you use the same .pbl for 1.8 as 1.6 for, for example bad moon rising?
User avatar
doofus-01
Art Director
Posts: 3948
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: translate=?

Post by doofus-01 »

Thanks for the reply. I used the same .pbl file for BMR in 1.6 (where it was set as translatable) and 1.7.5-8 (where it has never been translatable). I did have to switch to using wesnoth_addon_manager for 1.7, so I changed the .pbl file from

Code: Select all

...campaigns/my_campaign.pbl
to

Code: Select all

...add-ons/my_campaign/_server.pbl
I don't know if that has anything to do with anything.

This:

Code: Select all

python wesnoth_addon_manager --port=15001 -l    
Gives me this:
Spoiler:
The "false" entries make me think it's not set correctly. I will post my .pbl (sans passphrase) tomorrow, I don't have it with me now.
EDIT: This is the _server.pbl of the one I uploaded several times:

Code: Select all

author="doofus-01"
description="This era contains Primeval, Khthon, Ukian factions as well as a few smaller ones.  Not well balanced.  Needed for BMR & Trinity campaigns. (Revision 0.9.0.a: South-Seas is now a real faction and has been added to MP)"
icon="scenery/icepack-1.png"
passphrase="lalalala"
title="Archaic Era"
translate="true"
type="era"
version="0.9.0.a"

Thanks.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
doofus-01
Art Director
Posts: 3948
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: translate=?

Post by doofus-01 »

I saw this thread referenced in another one in this forum, and am now not sure if I made it sound like I was documenting my steps in fixing a .pbl file in the post above. I was not, nothing has changed. If the "translatable" = false entry of the add-on list doesn't mean what I think it means, then maybe there isn't a problem. But I would have thought "translatable" meant that it was set to be translatable, even if it isn't yet translated. And

Code: Select all

translate=true (or "true" or "yes")
has no effect that I can see.

I glanced at the wesnoth_addon_manager, but am not proficient enough with python or wesnoth's code to really know where "false" is coming from.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
SkeletonCrew
Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: translate=?

Post by SkeletonCrew »

I did some testing and it seems the translate field isn't set.

Can you check whether you have multiple .pbl files in your addons?

If all that fails could you try to upload a new test addon with a translate field
to test whether that works?
tsr
Posts: 790
Joined: May 24th, 2006, 1:05 pm

Re: translate=?

Post by tsr »

Hi,

I just uploaded a translate=true add-on, when will I see it at: http://www.wesnoth.org/gettext/index.ph ... age=alloff ?

/tsr
User avatar
doofus-01
Art Director
Posts: 3948
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: translate=?

Post by doofus-01 »

tsr wrote:I just uploaded a translate=true add-on,
Oh, go ahead and rub it in...
SkeletonCrew wrote:Can you check whether you have multiple .pbl files in your addons?

If all that fails could you try to upload a new test addon with a translate field
to test whether that works?
I only have one _server.pbl per add-on. I've tried uploading a dummy add-on with some variations in translate=true/1/yes or translatable=true, but it doesn't ever get set. Here is the dummy add-on.
The_PBL_Test.tgz
(496 Bytes) Downloaded 111 times
EDIT: I've removed this from the server.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
SkeletonCrew
Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: translate=?

Post by SkeletonCrew »

@tsr the Wescamp updating has just ran so it should be up soon...
if not you ran into the same problem as doofus-01

@doofus-01 I haven't found time to look further into the problem
but I see no obvious problem in your test addon. I hope to test
some more this weekend.
tsr
Posts: 790
Joined: May 24th, 2006, 1:05 pm

Re: translate=?

Post by tsr »

SkeletonCrew wrote:@tsr the Wescamp updating has just ran so it should be up soon...
if not you ran into the same problem as doofus-01
Ok, well so it seems. But on the other hand I'm not sure I use this text-domain stuff right.

And doodus-01, I wasn't trying to show but actually to show that others have the same (?) problem too ;)

/tsr
User avatar
doofus-01
Art Director
Posts: 3948
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: translate=?

Post by doofus-01 »

SkeletonCrew wrote:I hope to test some more this weekend.
Great. Thanks.
tsr wrote:I wasn't trying to show but actually to show that others have the same (?) problem too
Cheers. I see your WCE has translate set to "yes", so we don't have the exact same problem. But maybe it's related.

EDIT: I just tested this with 1.7.9. Unpacked the tarball into a USB-drive that had the dummy add-on, ran the python script from there. Uploaded fine, except the translate field is still false. So, no change.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
SkeletonCrew
Developer
Posts: 787
Joined: March 31st, 2006, 6:55 am

Re: translate=?

Post by SkeletonCrew »

doofus-01 wrote:I only have one _server.pbl per add-on. I've tried uploading a dummy add-on with some variations in translate=true/1/yes or translatable=true, but it doesn't ever get set. Here is the dummy add-on.
I just uploaded this addon and it has the translate flag set...
I tested it on both a local server and the official server and both have translate = true

So I'm really puzzled with what goes wrong... and I guess I'm not the only one...
User avatar
doofus-01
Art Director
Posts: 3948
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: translate=?

Post by doofus-01 »

Not exactly music to my ears, but at least it's working for everyone else. The only thing I can think to ask, and I cannot test this myself very easily, is this:

Does it make a difference if one uses the wesnoth_addon_manager versus the in-game button?

I have to use the python script data/tools/wesnoth_addon_manager. In that script, the only mention of "translate" in it is this

Code: Select all

for campaign in campaigns.get_all("campaign"):
                    column = [
                        campaign.get_text_val("type", "?"),
                        campaign.get_text_val("name", "?"),
                        campaign.get_text_val("title", "?"),
                        campaign.get_text_val("author", "?"),
                        campaign.get_text_val("version", "?"),
                        campaign.get_text_val("uploads", "?"),
                        campaign.get_text_val("downloads", "?"),
                        campaign.get_text_val("size", "?"),
                        time.ctime(int(campaign.get_text_val("timestamp", "0"))),
                        campaign.get_text_val("translate", "false")]

and I see that last line has a "false" instead of "?". I am reluctant to go messing with things I don't know how to test locally, but I guess I'll try changing that last line, and see if that does anything. I don't have the files right now, so I won't try that until tomorrow.
EDIT: ^ This did nothing useful, of course.
Last edited by doofus-01 on December 7th, 2009, 3:46 pm, edited 1 time in total.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
Huston
Posts: 1070
Joined: April 29th, 2009, 8:26 pm
Location: Somewhere in this World(I Think)

Re: translate=?

Post by Huston »

this is what i use and i haven't had a problem with it yet.

Code: Select all

translate=yes
coded Rebellion During the Dark Age
Currently working on:
Era of the Future
torangan
Retired Developer
Posts: 1365
Joined: March 27th, 2004, 12:25 am
Location: Germany

Re: translate=?

Post by torangan »

Which campaigns do you have problems with? A few are on the server but contain invalid characters or other errors. I posted about them a long time ago, nothing happened.
WesCamp-i18n - Translations for User Campaigns:
http://www.wesnoth.org/wiki/WesCamp

Translators for all languages required: contact me. No geek skills required!
User avatar
doofus-01
Art Director
Posts: 3948
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: translate=?

Post by doofus-01 »

torangan wrote:Which campaigns do you have problems with?
Anything I try to upload with wesnoth_addon_manager. Including the "The_PBL_Test" posted earlier in this thread, which someone (SkeletonCrew?) had uploaded and it set as translatable. I'd removed it and re-uploaded, and it's no longer translatable. I think the problem is with wesnoth_addon_manager. Or I'm not using it correctly, but --help and --verbose don't shed any light on this.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Post Reply