Julian Foad wrote:> Masaru Tsuchiyama wrote:
>
>> Does anybody comment my patch?
>
> Hi Masaru.
>
> It's not clear what is the reason for these changes. Your log message needs to answer the question "Why?".
>
>> Masaru Tsuchiyama wrote:
>>>   I attach a patch to create LC_MESSAGES directories and
>>>   copy subversion.mo files to the directories and do some extra works.
>>>
>>>   [[[
>>>
>>>   * build/generator/gen_win.py
>>>      (POFile.__init__) : set class member 'lang' to 'base'.
>>>
>>>   * build/generator/templates/build_locale.ezt
>>> () : change working directory by %~dp0 to make sure that the relative
>>>            paths, which are used in the bat file, are correct.
>
> Saying "to make sure ... paths ... are correct" suggests that you have found cases where the paths are not correct -- in other words, a bug. Can you describe it?

I thought working directory when VC6 invokes make file project is set to Output Directory.
But it was not true. This change tunrs out not to mandatory.
So I remove this change.


>>>      () : create mo directory only if the directory doesn't exist,
>>>            to suppress a warning.
>
> OK, good.

This change is independent.
So I make this as a separete patch.
I'll send this with another mail.

>
>>>      () : create LC_MESSAGES directories if they don't exist.
>>>      () : copy mo files to the LC_MESSAGES directories as subversion.mo
>> files.
>
> Are this last two changes adding new functionality, or what?

the last two changes and the first change are adding new functionality.
Those change makes it easy to debug i18n feature.

I make a new patch.

[[[
creae LC_MESSAGES directories and copy subversion.mo files
to make it easy to debug i18n feauture.

This change makes it possible to test i18n feauture by Visual Studio.

* build/generator/gen_win.py
  (POFile.__init__) : set class member 'lang' to 'base'.

* build/generator/templates/build_locale.ezt
  () : create LC_MESSAGES directories if they don't exist.
  () : copy mo files to the LC_MESSAGES directories as subversion.mo files.
]]]

Thank you for reviewing.

Regards.

--
Masaru Tsuchiyama <m.tma...@gmail.com>
Index: build/generator/gen_win.py
===================================================================
--- build/generator/gen_win.py  (revision 1517129)
+++ build/generator/gen_win.py  (working copy)
@@ -1028,6 +1028,7 @@ class POFile:
   def __init__(self, base):
     self.po = base + '.po'
     self.mo = base + '.mo'
+    self.lang = base
 
 # MSVC paths always use backslashes regardless of current platform
 def msvc_path(path):
Index: build/generator/templates/build_locale.ezt
===================================================================
--- build/generator/templates/build_locale.ezt  (revision 1517129)
+++ build/generator/templates/build_locale.ezt  (working copy)
@@ -24,6 +24,10 @@ set exitcode=0
 [for pofiles]echo Running msgfmt on [pofiles.po]...
 msgfmt.exe -c -o ..\..\%1\mo\[pofiles.mo] [pofiles.po]
 if errorlevel 1 goto err
+set LANG_DIR=..\..\%1\subversion\share\locale\[pofiles.lang]\LC_MESSAGES
+IF NOT EXIST %LANG_DIR% mkdir %LANG_DIR%
+copy /Y ..\..\%1\mo\[pofiles.mo] %LANG_DIR%\subversion.mo
+if errorlevel 1 goto err
 [end]
 goto end
 @rem **************************************************************************

Reply via email to