Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2020 19:34:27 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r536144 - head/graphics/inkscape/files
Message-ID:  <202005211934.04LJYRX4020539@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Thu May 21 19:34:26 2020
New Revision: 536144
URL: https://svnweb.freebsd.org/changeset/ports/536144

Log:
  graphics/inkscape: fix build error "default.es_MX.svg:No such file or directory"
  
  The translation file es_MX.po has a fuzzy attribute for the msgid
  "Label", so when evaluating this translation, gettext will fall
  through to language 'es' for the translation. If
  po/locale/es/LC_MESSAGES/inkscape.mo does not exist at the time of
  the call, the translation will fail, and "Label" will be returned,
  causing the check to fail, preventing writing es_MX.svg.
  
  The order in which languages are processed is determined by the
  results of glob.glob, which may vary with filesystem type. In some
  build environments, 'es' is processed before 'es_MX', and no problem
  occurs. This is not guaranteed, however. In other build environments,
  'es_MX' occurs first, and lacking 'es', the translation fails, and
  es_MX.svg is not generated.
  
  To remove reliance on a particular ordering of gmofiles, and ensure
  build reproducibility, process the translations in two complete
  passes -- one to copy the gmo files, and when complete, the second
  to actually use the translations to generate the svg files.
  
  PR:		246588
  Submitted by:	vvd@unislabs.com
  Obtained from:	https://gitlab.com/inkscape/inkscape/-/merge_requests/2020

Added:
  head/graphics/inkscape/files/patch-share_templates_create__default__templates.py   (contents, props changed)

Added: head/graphics/inkscape/files/patch-share_templates_create__default__templates.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inkscape/files/patch-share_templates_create__default__templates.py	Thu May 21 19:34:26 2020	(r536144)
@@ -0,0 +1,11 @@
+--- share/templates/create_default_templates.py.orig	2020-05-21 19:30:52 UTC
++++ share/templates/create_default_templates.py
+@@ -44,6 +44,8 @@ for language in languages:
+         os.makedirs(destination_dir)
+     shutil.copy(source, destination)
+ 
++# do another loop to ensure we've copied all the translations before using them
++for language in languages:
+     # get translation with help of gettext
+     translation = gettext.translation('inkscape', localedir=binary_dir + '/po/locale', languages=[language])
+     translated_string = translation.gettext(LAYER_STRING)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005211934.04LJYRX4020539>