Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed xgettext warnings in XLIFF parser. #96

Merged
merged 1 commit into from

2 participants

Ratnadeep Debnath Apostolis Bessas
Ratnadeep Debnath

This fixes xgettext warnings in Xliff handler's code.

Apostolis Bessas mpessas was assigned
Ratnadeep Debnath

@vrachil

Fixed the xgettext warnings :)

Ratnadeep Debnath

@mpessas

It's ready to be merged.

Apostolis Bessas mpessas merged commit 1699b49 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 6, 2012
  1. Ratnadeep Debnath
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 9 deletions.
  1. +14 −9 transifex/resources/formats/xliff.py
23 transifex/resources/formats/xliff.py
View
@@ -218,16 +218,21 @@ def parse_tag_file(self, file_node, is_source=False):
target_language = Language.objects.by_code_or_alias_or_none(
xliff_target_language_code)
if self.resource and source_language != self.resource.source_language:
- raise self.HandlerParseError(_("Source language code '%s' in "\
- "XLIFF file does not map to source language for the resource"\
- ": '%s'.") %(xliff_source_language_code,
- self.resource.source_language))
+ raise self.HandlerParseError(_("Source language code "\
+ "'%(source_lang_code)s' in XLIFF file does not map to "\
+ "source language for the resource: "\
+ "'%(resource_source_language)s'.") % {
+ 'source_lang_code': xliff_source_language_code,
+ 'resource_source_language': self.resource.source_language
+ })
if target_language and target_language != self.language:
- raise self.HandlerParseError(_("Target language code '%s' in "\
- "XLIFF file does not map to the translation language"\
- ": '%s' for which it was uploaded.") %(
- xliff_target_language_code,
- self.language))
+ raise self.HandlerParseError(_("Target language code "\
+ "'%(target_lang_code)s' in XLIFF file does not map "\
+ "to the translation language: '%(translation_language)s'"\
+ " for which it was uploaded.") % {
+ 'target_lang_code': xliff_target_language_code,
+ 'translation_language': self.language
+ })
context = [original, source_language, datatype]
for node in file_node.childNodes:
if node.nodeType == node.ELEMENT_NODE and node.localName == "body":
Something went wrong with that request. Please try again.