Only extract comments with the "Translator" tag
Previously all comments before a translated string were extracted. This change prevents translators from seeing unnecessary or misleading comments.
This commit is contained in:
		@@ -423,8 +423,9 @@ def retrieve():
 | 
			
		||||
    listing('python.txt', ['.py', '.py.in'])
 | 
			
		||||
 | 
			
		||||
    # additional keywords must always be kept in sync with those in genpot.sh
 | 
			
		||||
    os.system('''%(xgettext)s -F -c -j --directory=./ -d gramps '''
 | 
			
		||||
              '''-L Python -o gramps.pot --files-from=python.txt '''
 | 
			
		||||
    os.system('''%(xgettext)s -F --add-comments=Translators -j '''
 | 
			
		||||
              '''--directory=./ -d gramps -L Python '''
 | 
			
		||||
              '''-o gramps.pot --files-from=python.txt '''
 | 
			
		||||
              '''--debug --keyword=_ --keyword=ngettext '''
 | 
			
		||||
              '''--keyword=_T_ --keyword=trans_text:1,2c '''
 | 
			
		||||
              '''--keyword=_:1,2c --keyword=_T_:1,2c '''
 | 
			
		||||
@@ -437,8 +438,8 @@ def retrieve():
 | 
			
		||||
    # C format header (.h extension)
 | 
			
		||||
    for h in headers():
 | 
			
		||||
        print ('xgettext for %s' % h)
 | 
			
		||||
        os.system('''%(xgettext)s -F --add-comments -j -o gramps.pot '''
 | 
			
		||||
                  '''--keyword=N_ --from-code=UTF-8 %(head)s'''
 | 
			
		||||
        os.system('''%(xgettext)s -F --add-comments=Translators -j '''
 | 
			
		||||
                  '''-o gramps.pot --keyword=N_ --from-code=UTF-8 %(head)s'''
 | 
			
		||||
                  % {'xgettext': xgettextCmd, 'head': h}
 | 
			
		||||
                  )
 | 
			
		||||
    clean()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user