equal
deleted
inserted
replaced
69 yield "msgstr has invalid '&' followed by none" |
69 yield "msgstr has invalid '&' followed by none" |
70 |
70 |
71 deprecatedpe = None |
71 deprecatedpe = None |
72 @scanner() |
72 @scanner() |
73 def deprecatedsetup(pofile): |
73 def deprecatedsetup(pofile): |
74 pes = [p for p in pofile if p.msgid == 'DEPRECATED'] |
74 pes = [p for p in pofile |
|
75 if ((p.msgid == 'DEPRECATED' or p.msgid == '(DEPRECATED)') and |
|
76 p.msgstr)] |
75 if len(pes): |
77 if len(pes): |
76 global deprecatedpe |
78 global deprecatedpe |
77 deprecatedpe = pes[0] |
79 deprecatedpe = pes[0] |
78 |
80 |
79 @fatalchecker(r'\(DEPRECATED\)') |
81 @fatalchecker(r'\(DEPRECATED\)') |
106 ... msgid = 'Something (DEPRECATED, foo bar)', |
108 ... msgid = 'Something (DEPRECATED, foo bar)', |
107 ... msgstr= 'something (DETACERPED, foo bar)') |
109 ... msgstr= 'something (DETACERPED, foo bar)') |
108 >>> match(deprecated, pe) |
110 >>> match(deprecated, pe) |
109 """ |
111 """ |
110 if not ('(DEPRECATED)' in pe.msgstr or |
112 if not ('(DEPRECATED)' in pe.msgstr or |
111 (deprecatedpe and deprecatedpe.msgstr and |
113 (deprecatedpe and |
112 deprecatedpe.msgstr in pe.msgstr)): |
114 deprecatedpe.msgstr in pe.msgstr)): |
113 yield "msgstr inconsistently translated (DEPRECATED)" |
115 yield "msgstr inconsistently translated (DEPRECATED)" |
114 |
116 |
115 #################### |
117 #################### |
116 |
118 |