Inactive names and descriptions for abilities

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.
Post Reply
User avatar
FallenPhoenix
Posts: 42
Joined: September 30th, 2011, 5:20 pm
Location: Russia
Contact:

Inactive names and descriptions for abilities

Post by FallenPhoenix »

When I adapt or translating addons, I often found garbage-like strings from name_inactive and description_inactive attributes inside po/pot files. But don't sure when it used and when can be removed easily: there's too little info in wiki. Is there only for [filter] subtag? Could someone explain me?
Independent translator. // Sorry for my English :)
Моя версия перевода [url=http://forum.wesnothlife.ru/index.php?topic=1141.0]тут[/url].
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Inactive names and descriptions for abilities

Post by JaMiT »

I think the inactive names and descriptions are not actually used in 1.10. Starting in 1.11/1.12, though, they are used in the sidebar when the ability is not active (as defined via the ability's [filter]).

Still, there shouldn't be garbage being spontaneously created. Does the garbage in the po/pot files correspond to garbage in the WML files (where the ability is defined)?
User avatar
FallenPhoenix
Posts: 42
Joined: September 30th, 2011, 5:20 pm
Location: Russia
Contact:

Re: Inactive names and descriptions for abilities

Post by FallenPhoenix »

Of source, I'm about cleaning of WML to prevent generating dirty translation files (or just mark it as garbage and never translate). Just seems, addons developers like to use this fields as backups or something like this. So, any abilities without [filter] tag never use this values?

Example:

Code: Select all

[hides]
	id=conceal
	name= _ "conceal"
	female_name= _ "female^conceal"
	description= _ "Conceal:
This unit can hide in villages, and remain undetected by its enemies, except by those standing next to it.

Enemy units can not see this unit while it is in a village, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
	name_inactive= _ "concealment"
	female_name_inactive= _ "female^concealment"
	description_inactive= _ "Concealment:
This unit can hide in villages, and remain undetected by its enemies, except by those standing next to it.

Enemy units can not see this unit while it is in a village, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
	affect_self=yes
	[filter_self]
		[filter_location]
			terrain=*^V*
		[/filter_location]
	[/filter_self]
[/hides]
Independent translator. // Sorry for my English :)
Моя версия перевода [url=http://forum.wesnothlife.ru/index.php?topic=1141.0]тут[/url].
JaMiT
Inactive Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Inactive names and descriptions for abilities

Post by JaMiT »

Well, for that particular example, someone took the standard "concealment" ability and renamed it "conceal", but only for the active fields. And either dropped the phrase "(with the exception of water villages)" from the description or copied the ability before that phrase was added to mainline. Probably the latter since it was dropped from the inactive description as well.

So I would not call this "use as backups", but "copied then neglected". Maybe "unfinished".

FallenPhoenix wrote:So, any abilities without [filter] tag never use this values?
Well, yes and no. Strictly speaking, an ability without a [filter] tag will never use the inactive name/description. On the other hand, a [filter_self] might very well get changed to a [filter] once the author realizes that is how to trigger use of the inactive name. (The mainline concealment ability, for example, has this change in 1.11.)

So if you are translating with an eye toward 1.11/1.12, then you probably want to translate the inactive name/description if the ability has any subtags or if you know the ability is not always on. (If you are translating strictly for 1.10, you could skip the inactive name/description every time.)
Post Reply