Change path of localization fies to fit Debian standard. (Closes: Bug#73368)
authorAbou Al Montacir <abou.almontacir@sfr.fr>
Wed, 15 Jan 2014 20:49:04 +0000 (21:49 +0100)
committerPaul Gevers <elbrus@debian.org>
Mon, 13 Oct 2014 19:16:54 +0000 (19:16 +0000)
Gbp-Pq: Name change-path-of-localization-files-to-fit-Debian-standar.patch

fpcsrc/utils/fpdoc/dglobals.pp
fpcsrc/utils/fpdoc/fpclasschart.pp
fpcsrc/utils/fpdoc/fpdoc.pp
fpcsrc/utils/fpdoc/intl/Makefile
fpcsrc/utils/fpdoc/makeskel.pp
fpcsrc/utils/fpdoc/unitdiff.pp

index 4e1a7167a0941ff609c3a983bdcd278300b93385..d98306224bf74dff9048d51f35f68abee368d439 100644 (file)
@@ -1620,7 +1620,7 @@ procedure TranslateDocStrings(const Lang: String);
 
 Const
 {$ifdef unix}
-  DefDir = '/usr/local/share/locale';
+  DefDir = '/usr/share/locale';
 {$else}  
   DefDir = 'intl';
 {$endif}
@@ -1634,7 +1634,7 @@ begin
     Dir:=DefDir;
   Dir:=IncludeTrailingPathDelimiter(Dir);
 {$IFDEF Unix}
-  mo := TMOFile.Create(Format(Dir+'%s/LC_MESSAGES/dglobals.mo', [Lang]));
+  mo := TMOFile.Create(Format(Dir+'%s/LC_MESSAGES/dglobals-' + {$include %FPCVERSION%} + '.mo', [Lang]));
 {$ELSE}
   mo := TMOFile.Create(Format(Dir+'dglobals.%s.mo', [Lang]));
 {$ENDIF}
index 3cb7bcd871066072860baa133029d8f287833094..efceef5a8202a6cf5ea0cec088348eaf07634f2e 100644 (file)
@@ -689,7 +689,7 @@ Function ParseCommandLine : Integer;
 
 Const
 {$IFDEF Unix}
-  MoFileTemplate = '/usr/local/share/locale/%s/LC_MESSAGES/makeskel.mo';
+  MoFileTemplate = '/usr/share/locale/%s/LC_MESSAGES/makeskel-' + {$include %FPCVERSION%} + '.mo';
 {$ELSE}
   MoFileTemplate ='intl/makeskel.%s.mo';
 {$ENDIF}
index 122c55e81eaff999e87ef8829eadbf7647da0b17..26aa882fb430927f95e3d23dd84bb46c06318a3b 100644 (file)
@@ -368,7 +368,7 @@ Procedure TFPDocApplication.DoRun;
 
 begin
 {$IFDEF Unix}
-  gettext.TranslateResourceStrings('/usr/local/share/locale/%s/LC_MESSAGES/fpdoc.mo');
+  gettext.TranslateResourceStrings('/usr/share/locale/%s/LC_MESSAGES/fpdoc-' + {$include %FPCVERSION%} + '.mo');
 {$ELSE}
   gettext.TranslateResourceStrings('intl/fpdoc.%s.mo');
 {$ENDIF}
index 0ad56eb39e5f8d503505d05462283d32a10d2bee..a356d08b4a2b10e85d82457713144854997f50d8 100644 (file)
@@ -1,3 +1,5 @@
+FPC_VERSION=$(shell ${PP} -iV)
+
 all:   de
 
 clean:
@@ -16,8 +18,8 @@ pot:
        rstconv -i ../makeskel.rst -o makeskel.pot
        rstconv -i ../fpdocmk.rst -o fpdocmk.pot
 
-install:
-       install -D -m 0644 fpdoc.de.mo /usr/local/share/locale/de/LC_MESSAGES/fpdoc.mo
-       install -D -m 0644 dglobals.de.mo /usr/local/share/locale/de/LC_MESSAGES/dglobals.mo
-       install -D -m 0644 makeskel.de.mo /usr/local/share/locale/de/LC_MESSAGES/makeskel.mo
-       install -D -m 0644 fpdocmk.de.mo /usr/local/share/locale/de/LC_MESSAGES/fpdocmk.mo
+install: de
+       install -D -m 0644 fpdoc.de.mo ${INSTALL_PREFIX}/share/locale/de/LC_MESSAGES/fpdoc-${FPC_VERSION}.mo
+       install -D -m 0644 dglobals.de.mo ${INSTALL_PREFIX}/share/locale/de/LC_MESSAGES/dglobals-${FPC_VERSION}.mo
+       install -D -m 0644 makeskel.de.mo ${INSTALL_PREFIX}/share/locale/de/LC_MESSAGES/makeskel-${FPC_VERSION}.mo
+       install -D -m 0644 fpdocmk.de.mo ${INSTALL_PREFIX}/share/locale/de/LC_MESSAGES/fpdocmk-${FPC_VERSION}.mo
index 34952989202c05bf14b4fa41d42df7d6340edd59..e9cd8eb4197cd3762236811e2735796f19e48792 100644 (file)
@@ -548,7 +548,7 @@ Function ParseCommandLine : Integer;
 
 Const
 {$IFDEF Unix}
-  MoFileTemplate = '/usr/local/share/locale/%s/LC_MESSAGES/makeskel.mo';
+  MoFileTemplate = '/usr/share/locale/%s/LC_MESSAGES/makeskel-' + {$include %FPCVERSION%} + '.mo';
 {$ELSE}
   MoFileTemplate ='intl/makeskel.%s.mo';
 {$ENDIF}
index d77c5d4db69e7ce298469dac6c793e396117771a..8f4947b26aaaeba5c6ec2b94acd5b71a5150907b 100644 (file)
@@ -167,7 +167,7 @@ procedure ParseCommandLine;
 
 Const
 {$IFDEF Unix}
-  MoFileTemplate = '/usr/local/share/locale/%s/LC_MESSAGES/makeskel.mo';
+  MoFileTemplate = '/usr/share/locale/%s/LC_MESSAGES/makeskel-' + {$include %FPCVERSION%} + '.mo';
 {$ELSE}
   MoFileTemplate ='intl/makeskel.%s.mo';
 {$ENDIF}