OSDN Git Service

Run GetTranslationsStatus.py when English.pot is updated.
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 17 Jan 2021 06:11:24 +0000 (15:11 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 17 Jan 2021 06:11:24 +0000 (15:11 +0900)
BuildManual.cmd
Src/MergeLang.vs2017.vcxproj
Src/MergeLang.vs2019.vcxproj

index b3d4da3..8edb02c 100644 (file)
@@ -1,10 +1,2 @@
-pushd Translations
-for %%i in ("%LOCALAPPDATA%\Programs\Python\Python39" "C:\Python39") do (
-  if exist "%%~i\python.exe" (
-    "%%~i\python.exe" GetTranslationsStatus.py
-  )
-) 
-popd
-
 call Docs\Manual\build_htmlhelp_en.bat
 call Docs\Manual\build_htmlhelp_jp.bat
index bfd2fd2..67ecc67 100644 (file)
@@ -104,10 +104,23 @@ attrib -a English.pot
 findstr /v POT-Creation-Date English.pot &gt; English.pot.flt
 findstr /v POT-Creation-Date English.pot.prev &gt; English.pot.prev.flt
 fc English.pot.flt English.pot.prev.flt
-if not errorlevel 1 copy /y English.pot.prev English.pot
+if not errorlevel 1 (
+  copy /y English.pot.prev English.pot
+) else (
+  set POT_UPDATED=true
+)
 del English.pot.prev English.pot.flt English.pot.prev.flt
 set LIB=
 powershell -ExecutionPolicy ByPass -File UpdatePoFilesFromPotFile.ps1
+if "%POT_UPDATED%" == "true" (
+  pushd ..
+  for %%i in ("%LOCALAPPDATA%\Programs\Python\Python39" "C:\Python39") do (
+    if exist "%%~i\python.exe" (
+      "%%~i\python.exe" GetTranslationsStatus.py
+    )
+  ) 
+  popd
+)
 popd
 </Command>
       <Outputs>$(ProjectDir)..\Translations\WinMerge\MergeLang.lastbuild</Outputs>
@@ -156,4 +169,4 @@ popd
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
index b4d64fa..a299bac 100644 (file)
@@ -103,10 +103,23 @@ attrib -a English.pot
 findstr /v POT-Creation-Date English.pot &gt; English.pot.flt
 findstr /v POT-Creation-Date English.pot.prev &gt; English.pot.prev.flt
 fc English.pot.flt English.pot.prev.flt
-if not errorlevel 1 copy /y English.pot.prev English.pot
+if not errorlevel 1 (
+  copy /y English.pot.prev English.pot
+) else (
+  set POT_UPDATED=true
+)
 del English.pot.prev English.pot.flt English.pot.prev.flt
 set LIB=
 powershell -ExecutionPolicy ByPass -File UpdatePoFilesFromPotFile.ps1
+if "%POT_UPDATED%" == "true" (
+  pushd ..
+  for %%i in ("%LOCALAPPDATA%\Programs\Python\Python39" "C:\Python39") do (
+    if exist "%%~i\python.exe" (
+      "%%~i\python.exe" GetTranslationsStatus.py
+    )
+  ) 
+  popd
+)
 popd
 </Command>
       <Outputs>$(ProjectDir)..\Translations\WinMerge\MergeLang.lastbuild</Outputs>
@@ -155,4 +168,4 @@ popd
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>