why my translation can not work?
Moderator: Forum Moderators
why my translation can not work?
zip file is can not work translation add-on
po file is use make mo file
po file is use make mo file
- Attachments
-
- zh.po
- (2.02 KiB) Downloaded 72 times
-
- NowWesnoth.zip
- (45.92 KiB) Downloaded 66 times
Re: why my translation can not work?
Wesnoth can read .po files directly (since Wesnoth 1.14), so there's no need to manipulate a .mo file.
Details about where to put the .po and make it work are on GettextForWesnothDevelopers#Generating_the_.pot_and_.po_files_for_UMC.
Details about where to put the .po and make it work are on GettextForWesnothDevelopers#Generating_the_.pot_and_.po_files_for_UMC.
Re: why my translation can not work?
Try making these changes:
- In
_main.cfg
, move the[textdomain]...[/textdomain]
code so it occurs before the#ifdef MULTIPLAYER
line. - In other files - use the line
#textdomain test
(example: in the fileunits/Loyalists/Bomber.cfg
, change#textdomain wesnoth-units
to#textdomain test
).
It is simpler to just use the .po files, but the .mo files should still work.
Re: why my translation can not work?
Now,can not work too(use po file)octalot wrote: ↑October 22nd, 2022, 3:59 pm Wesnoth can read .po files directly (since Wesnoth 1.14), so there's no need to manipulate a .mo file.
Details about where to put the .po and make it work are on GettextForWesnothDevelopers#Generating_the_.pot_and_.po_files_for_UMC.
- Attachments
-
- NowWesnoth.zip
- (46.82 KiB) Downloaded 67 times
Re: why my translation can not work?
The .po file doesn't look right, I've attached a fixed version.
- Attachments
-
- zh_CN.po
- (1.73 KiB) Downloaded 64 times
Re: why my translation can not work?
The line
msgid ""
(with the empty string) is a special case, it represents the "header" of the file and it should be the first entry in the file (and it should not appear anywhere else in the file). It should be followed by msgstr ""
and then the header lines (example: "Project-Id-Version: ...\n"
, etc.).This document describes the .po format in detail.