ImageLocalization

From The Battle for Wesnoth Wiki
Revision as of 12:13, 19 April 2008 by Caslav.ilic (talk | contribs) (Sentence structure.)

NOTE: This article is in support of a feature proposal, its content is not applicable at the moment.

Being a game, Wesnoth's graphics data carries higher significance than it would in utilitarian software. An image containing English text in an otherwise native language environment, may bite at user's immersion. E.g. having a mismatch between geographical names in translated text and on maps (think "Blackwater Port", "Ford of Abez", etc.) will certainly not improve user's feeling of completeness of localization effort.

To offset this, a willing translator can also localize images into the world of Wesnoth.

How Does It Work?

Quite not unlike with text. Most text appearing in Wesnoth is up for translation, but given language's translators may leave some untranslated -- either deliberately (i.e. just copying English original), or because they didn't get to it yet. Likewise with the images: any can be localized, but none needs be; if there is no localized version of a given image, the user is presented with the original one. The only difference between text and images is that, unlike text, very few images possibly need to be localized -- presently, about 30 in total.

Once the localized image is made, putting it to work is simple: if the path of the original image in the source tree is:

foo/bar/baz/image.png

then the localized image should be put in:

foo/bar/baz/l10n/ll/image.png

where ll is the given language's code, like that used for names of PO files (e.g. de, pt_BR, etc.) That's it.

If, after some time, the original image changes, a tracker script which is run periodically on the repository will rename the localized version like this:

foo/bar/baz/l10n/ll/image~fuzzy.png

putting it effectively out of business until manually inspected, possibly modified, and renamed back to ordinary name -- just like with fuzzy messages in PO files. Furthermore, if the original image is removed or renamed, the localized one will be marked as obsolete:

foo/bar/baz/l10n/ll/image~obsolete.png

when it should be either removed or renamed itself.

The technicalities are thus rather simple, the main challenge instead is how to create the localized out of the original images in the first place. This depends on the type of the image: from trivial screenshots, to the rather complex Wesnoth logo itself. Most of the rest of this article will deal with this.

Overlay Images

A special kind of localized image is an overlay image -- one which does not simply replace the original, but is combined with it at runtime, overlaying the original content. Of course, the overlay image should have some transparent regions, through which the original content will show up. The overlay image is indicated by adding --ovr suffix to its original name:

foo/bar/baz/l10n/ll/image--ovr.png

Overlay images are used purely to avoid needlesly growing the size of Wesnoth packages, in cases when the full image is rather large and only small parts of it need localization. This is typical of maps.

List of Images for Localization

An up-to-date list of images possibly needing localization is given here, and updated as people spot any new such image. Here, "possible" means judged such by at least one translator. Those are typically images containing some English text, but depending on the particular text, many languages may also like to keep it as in English (e.g. "Weldyn").

In-game images:

images/misc/logo.png
data/core/images/misc/logo.png
  -- The BfW logo, visible in the main menu, loading screens,
     and elsewhere (both files are same)
data/core/images/maps/mainmenu.png
  -- the map in the background of the main menu
((continue the list))

Images in the manual:

manual/images/main-menu.jpg
manual/images/multiplayer.jpg
manual/images/game-screen.jpg
manual/images/top_pane.jpg
manual/images/right_pane.jpg
manual/images/recruit.jpg

If you come across an image eligible for localization and not listed here, please add it.

Creating Localized Images

This section gives brief, but hopefully sufficient instructions on how to produce localized images, by each distinct type.

In many cases it will be needed to edit a prepared image template with a general image manipulation app, and the instructions here will be presented using Gimp, a popular and free tool for this purpose. There is also a section of this article describing some of the Gimp's features frequently used in present context.

Screenshots

((to be done))

((to be done))

Maps

((to be done))

Overlay Cuts

((to be done))

Gimp For Translators

((to be done))