Opened 19 years ago

Closed 16 years ago

Last modified 13 years ago

#1157 closed defect (fixed)

i18n rely on xgettext which does not exists on win32

Reported by: hipertracker@… Owned by: hugo
Component: Documentation Version:
Severity: major Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

i18n cannot be used in win32 because make-messages.py rely on xgettext application which does not exist on win32. There is also no links to binary version and compiling it source on win32 is very cumbersome.

Attachments (2)

i18n.diff (1.6 KB ) - added by Simon G. <dev@…> 18 years ago.
t1157_r8061.diff (2.2 KB ) - added by Ramiro Morales 16 years ago.
i18n documentation patch updated (to r8061) and tweaked

Download all attachments as: .zip

Change History (13)

comment:1 by hugo, 19 years ago

Resolution: invalid
Status: newclosed

xgettext is part of the cygwin gettext stuff. Translators are responsible to setup their own environment to be able to use the gettext utilities, but binaries of the cygwin stuff are readily available. xgettext is needed because Django uses standard gettext tools and libraries.

comment:2 by Adrian Holovaty, 19 years ago

Hugo, we should update the i18n docs to point this out. Which Windows users need cygwin -- just translators, or all i18n users?

comment:3 by hugo, 19 years ago

The gettext stuff is only needed for people who either want to extract message IDs or compile .po files. Translation work itself just uses existing .po files, but if you want to create your own .po files, or want to test or activate a changed .po file, you will need the gettext utilities. This isn't tied to Windows - it's the same with every other operating system, too. The make-messages.py and compile-messages.py scripts just use some of the gettext utilities, which are - at the current time - xgettext, msguniq and msgfmt.

With Windows it's the cygwin stuff that's best used (at least that's what I read from comments around the web - I myself don't use Windows and so don't have first-hand experience with what tools to use there), with Linux it's the distribution-provided gettext or gettext-utils (or whatever it is named) package.

I'll put a section into the l10n page in the wiki and post a note to the i18n list so people add their plugs for tools to be used in that area - so they can put in things like poedit or emacs po mode or whatever they think would be useful for people to work on .po files.

comment:4 by hipertracker@…, 19 years ago

There is no need for Cygwin. All necessary files can be downloaded at http://sourceforge.net/project/showfiles.php?group_id=25167

comment:5 by samuel.adam@…, 18 years ago

It should be made clear in the docs that gettext is a third party tool.

  1. Win32 users need to dowload 3 zip files from http://sourceforge.net/projects/gettext :
  • gettext-runtime-X.bin.woe32.zip
  • gettext-tools-X.bin.woe32.zip
  • libiconv-X.bin.woe32.zip
  1. extract the 3 files in the same folder ( ie C:\Program Files\gettext-utils )
  1. Update the system PATH :

Control Panel > System > Advanced > Environment Variables
In the "System variables" list, click "Path", click "Edit"
Add ";C:\Program Files\gettext-utils\bin" at the end of the "Variable value"

comment:6 by Simon G. <dev@…>, 18 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

Here's a patch that combines Hugo and Samuel's info (give them the credit!). Can someone who knows i18n and windows better than I do, double check this please?

by Simon G. <dev@…>, 18 years ago

Attachment: i18n.diff added

comment:7 by anonymous, 16 years ago

milestone: 1.0 beta
Resolution: invalid
Status: closedreopened

Simon, I cheked your patch today, and it's ok (realy it helped me a lot!). I think it's ready for check in and 1.0 beta so i am reopening it.

comment:8 by Karen Tracey <kmtracey@…>, 16 years ago

Also reported in #7740. I think the component for this should perhaps be Documentation, since that is what the patch touches. Also the text may need a little editing. It says Windows doesn't have gettext and that therefore if you are running on Windows you will need to install it separately. If I read that, I would first verify I didn't have gettext by trying to import it from a Python shell -- and when import gettext worked fine (which it does, all the way back to 2.3), I would conclude the note was out of date. It does note later that you only need this other package (gettext "stuff") if you are creating/activating .po files. Anyway I think it should be clearer sooner that Windows does have basic gettext, it is these extra utilities or something that you may need to install separately if you are working with creating/modifying translations.

by Ramiro Morales, 16 years ago

Attachment: t1157_r8061.diff added

i18n documentation patch updated (to r8061) and tweaked

in reply to:  8 comment:9 by Ramiro Morales, 16 years ago

Component: InternationalizationDocumentation

Replying to Karen Tracey <kmtracey@gmail.com>:
(Oops, I was working on updating the patch at the same time you were adding your comment)

I think the component for this should perhaps be Documentation, since that is what the patch touches.

Done

Also the text may need a little editing. It says Windows doesn't have gettext and that therefore if you are running on Windows you will need to install it separately. If I read that, I would first verify I didn't have gettext by trying to import it from a Python shell -- and when import gettext worked fine (which it does, all the way back to 2.3), I would conclude the note was out of date. It does note later that you only need this other package (gettext "stuff") if you are creating/activating .po files. Anyway I think it should be clearer sooner that Windows does have basic gettext, it is these extra utilities or something that you may need to install separately if you are working with creating/modifying translations.

Right. The new patch moves the note about gettext on Windows from the section where the document talks about the runtime Python gettext machinery to the sections where it talks about the use of the makemessages and compilemessages.

I know Malcolm wants to refactor i18n.txt but I thought adding this information would at least help people tripping over this and as a reminder it would be a good idea this bit of platform specific not be forgotten when the time comes.

comment:10 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: reopenedclosed

(In [8134]) Fixed #1157 -- Added some text to i18n.txt to explain how to install the
necessary gettext tools on Windows (relevant to translators only). Thanks,
Ramiro Morales.

comment:11 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

Note: See TracTickets for help on using tickets.
Back to Top