Difference between revisions of "ImageLocalization"

From The Battle for Wesnoth Wiki
m (Complete the list of images for localization.)
(Update to latest state of affairs.)
Line 29: Line 29:
 
when it should be either removed or renamed itself.
 
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.
+
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 more complex Wesnoth logo. Most of the rest of this article will deal with this.
  
 
=== Overlay Images ===
 
=== Overlay Images ===
Line 49: Line 49:
 
   -- The BfW logo, visible in the main menu, loading screens,
 
   -- The BfW logo, visible in the main menu, loading screens,
 
       and elsewhere (both files are same)
 
       and elsewhere (both files are same)
 
data/core/images/maps/mainmenu.png
 
  -- the map in the background of the main menu
 
  
 
  data/core/images/maps/wesnoth.png
 
  data/core/images/maps/wesnoth.png
   -- Wesnoth's main map, used in several campaigns
+
   -- Wesnoth's main map, in the background of the main menu
 +
      and as the main map in some campaigns
  
 
  data/core/images/help/hpxp.png
 
  data/core/images/help/hpxp.png
Line 61: Line 59:
 
   -- screenshots in the help sections
 
   -- screenshots in the help sections
  
  data/campaigns/The_South_Guard/images/story/bigmap.jpg
+
  data/campaigns/An_Orcish_Incursion/images/an-orcish-incursion-map.png
  -- map for the TSG campaign
+
data/campaigns/Eastern_Invasion/images/eastern-invasion-map.png
 
+
data/campaigns/Legend_of_Wesmere/images/legend-of-wesmere-map.png
  data/campaigns/Liberty/images/maps/wesnoth-liberty.png
+
  data/campaigns/Liberty/images/maps/liberty-map.png
   -- map for the Liberty campaign (slightly modified main menu map)
+
data/campaigns/Son_Of_The_Black_Eye/images/farnorth.png
 +
   -- main maps of respective campaigns
  
 
  data/campaigns/The_Rise_Of_Wesnoth/images/story/trow-logo.png
 
  data/campaigns/The_Rise_Of_Wesnoth/images/story/trow-logo.png
Line 76: Line 75:
 
  data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-stormvale.png
 
  data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-stormvale.png
 
  data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-thegreenisle.png
 
  data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-thegreenisle.png
   -- text overlays for the TRoW campaign
+
   -- text overlays in the TRoW campaign
 
 
data/campaigns/Son_Of_The_Black_Eye/images/sotbe.png
 
data/campaigns/Son_Of_The_Black_Eye/images/sotbe1.png
 
data/campaigns/Son_Of_The_Black_Eye/images/sotbe2.png
 
data/campaigns/Son_Of_The_Black_Eye/images/sotbe3.png
 
  -- maps for the SoTBE campaign
 
  
 
* Images in the manual:
 
* Images in the manual:
  
  manual/images/main-menu.jpg
+
  doc/manual/images/game-screen.jpg
  manual/images/multiplayer.jpg
+
  doc/manual/images/main-menu.jpg
  manual/images/game-screen.jpg
+
  doc/manual/images/multiplayer.jpg
  manual/images/top_pane.jpg
+
  doc/manual/images/recruit.jpg
  manual/images/right_pane.jpg
+
  doc/manual/images/right_pane.jpg
  manual/images/recruit.jpg
+
  doc/manual/images/top_pane.jpg
  
 
If you come across an image eligible for localization and not listed here, please add it.
 
If you come across an image eligible for localization and not listed here, please add it.
Line 97: Line 90:
 
== Creating Localized Images ==
 
== Creating Localized Images ==
  
This section gives brief, but hopefully sufficient instructions on how to produce localized images, by each distinct type.
+
This section gives brief, but hopefully sufficient instructions on how to produce localized images, by each distinct type. Note that there is a balance between simplicity of instructions and quality of final images -- whenever you can do better than describe here, do not hesitate.
 +
 
 +
Most of the time it will be necessary to edit an image template using a general image manipulation app, and the instructions here will be presented with [http://www.gimp.org/ Gimp], a popular and free tool for this purpose. There is also a [[#Gimp For Translators|section of this article]] describing some of the Gimp's features frequently used in present context.
  
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 [http://www.gimp.org/ Gimp], a popular and free tool for this purpose. There is also a [[#Gimp For Translators|section of this article]] describing some of the Gimp's features frequently used in present context.
+
((to be done: place the illustrations linked in this article in some less volatile place; place any external template images into main repository))
  
 
=== Screenshots ===
 
=== Screenshots ===

Revision as of 23:52, 23 March 2009

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 more complex Wesnoth logo. 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/wesnoth.png
  -- Wesnoth's main map, in the background of the main menu
     and as the main map in some campaigns
data/core/images/help/hpxp.png
data/core/images/help/recruit.png
data/core/images/help/tooltip.png
  -- screenshots in the help sections
data/campaigns/An_Orcish_Incursion/images/an-orcish-incursion-map.png
data/campaigns/Eastern_Invasion/images/eastern-invasion-map.png
data/campaigns/Legend_of_Wesmere/images/legend-of-wesmere-map.png
data/campaigns/Liberty/images/maps/liberty-map.png
data/campaigns/Son_Of_The_Black_Eye/images/farnorth.png
  -- main maps of respective campaigns
data/campaigns/The_Rise_Of_Wesnoth/images/story/trow-logo.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/east.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/west.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-blackmore.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-clearwater.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-jevyan.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-southbay.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-stormvale.png
data/campaigns/The_Rise_Of_Wesnoth/images/story/tgi-thegreenisle.png
  -- text overlays in the TRoW campaign
  • Images in the manual:
doc/manual/images/game-screen.jpg
doc/manual/images/main-menu.jpg
doc/manual/images/multiplayer.jpg
doc/manual/images/recruit.jpg
doc/manual/images/right_pane.jpg
doc/manual/images/top_pane.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. Note that there is a balance between simplicity of instructions and quality of final images -- whenever you can do better than describe here, do not hesitate.

Most of the time it will be necessary to edit an image template using a general image manipulation app, and the instructions here will be presented with 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.

((to be done: place the illustrations linked in this article in some less volatile place; place any external template images into main repository))

Screenshots

((to be done))

((to be done))

Maps

((to be done))

Overlay Cuts

((to be done))

Gimp For Translators

((to be done))