From ebec12b4b95f988402206c7a42ecb6a949c177f3 Mon Sep 17 00:00:00 2001 From: johncoswell Date: Sun, 10 Feb 2008 16:13:36 +0000 Subject: [PATCH] Make options in perfect bound cover generator translatable --- share/extensions/perfectboundcover.inx | 20 ++++++++++---------- share/extensions/perfectboundcover.py | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/share/extensions/perfectboundcover.inx b/share/extensions/perfectboundcover.inx index 422c32964..f3bb95299 100644 --- a/share/extensions/perfectboundcover.inx +++ b/share/extensions/perfectboundcover.inx @@ -10,20 +10,20 @@ true <_param name="paper" type="description">Interior Pages - - - - - + <_option value="ppi">Pages Per Inch (PPI) + <_option value="caliper">Caliper (inches) + <_option value="points">Points + <_option value="bond_weight">Bond Weight # + <_option value="width">Specify Width 0 <_param name="cover" type="description">Cover - - - - - + <_option value="ppi">Pages Per Inch (PPI) + <_option value="caliper">Caliper (inches) + <_option value="points">Points + <_option value="bond_weight">Bond Weight # + <_option value="width">Specify Width 0 .25 diff --git a/share/extensions/perfectboundcover.py b/share/extensions/perfectboundcover.py index d4e53dba1..0482feb87 100644 --- a/share/extensions/perfectboundcover.py +++ b/share/extensions/perfectboundcover.py @@ -84,15 +84,15 @@ class PerfectBoundCover(inkex.Effect): help="dummy") def effect(self): switch = { - "Pages Per Inch (PPI)": lambda x: x, - "Caliper (inches)": lambda x: caliper_to_ppi(x), - "Bond Weight #": lambda x: bond_weight_to_ppi(x), - "Points": lambda x: points_to_ppi(x), - "Specify Width": lambda x: x + "ppi": lambda x: x, + "caliper": lambda x: caliper_to_ppi(x), + "bond_weight": lambda x: bond_weight_to_ppi(x), + "points": lambda x: points_to_ppi(x), + "width": lambda x: x } if self.options.paperthickness > 0: - if self.options.paperthicknessmeasurement == "Specify Width": + if self.options.paperthicknessmeasurement == "width": paper_spine = self.options.paperthickness else: paper_spine = self.options.pages / switch[self.options.paperthicknessmeasurement](self.options.paperthickness) @@ -100,7 +100,7 @@ class PerfectBoundCover(inkex.Effect): paper_spine = 0 if self.options.coverthickness > 0: - if self.options.coverthicknessmeasurement == "Specify Width": + if self.options.coverthicknessmeasurement == "width": cover_spine = self.options.coverthickness else: cover_spine = 4.0 / switch[self.options.coverthicknessmeasurement](self.options.coverthickness) -- 2.30.2