changeset 468:8b53c9f8da32

CheckTranslation.py: master-rev renamed to master-revision, several typos (underscore instead of dash) in messages fixed.
author Eugene Syromyatnikov <evgsyr@gmail.com>
date Mon, 21 Dec 2009 20:35:18 +0300
parents b7757d0badd7
children 045b03f49a3e
files data/plugin/action/CheckTranslation.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/CheckTranslation.py	Mon Dec 21 13:02:58 2009 +0300
+++ b/data/plugin/action/CheckTranslation.py	Mon Dec 21 20:35:18 2009 +0300
@@ -115,7 +115,7 @@
                         'page_lang': request.formatter.text(trans_page.pi['language']),
                     })
 
-                master_meta_names = ['page', 'date', 'rev']
+                master_meta_names = ['page', 'date', 'revision']
                 master_metas = {}
 
                 for meta in master_meta_names:
@@ -131,19 +131,19 @@
                         })
                 else:
                     if translation_warnings['missing_master_page_meta']:
-                        trans_status.append(_('/!\\ Translated page has no ##master-page special comment. Please, add line "##master_page:%s" somewhere at beginning of the translated page.', wiki=True) % request.formatter.text(orig_page_name))
+                        trans_status.append(_('/!\\ Translated page has no ##master-page special comment. Please, add line "##master-page:%s" somewhere at beginning of the translated page.', wiki=True) % request.formatter.text(orig_page_name))
 
-                if 'date' not in master_metas and 'rev' not in master_metas and translation_warnings['missing_master_date_or_rev_meta']:
-                    trans_status.append(_('/!\\ Translated page has neither of ##master-date or ##master-rev special comments. Please, add at least one.', wiki=True))
+                if 'date' not in master_metas and 'revision' not in master_metas and translation_warnings['missing_master_date_or_rev_meta']:
+                    trans_status.append(_('/!\\ Translated page has neither of ##master-date or ##master-revision special comments. Please, add at least one.', wiki=True))
 
-                if 'rev' in master_metas:
+                if 'revision' in master_metas:
                     orig_page_rev = orig_page.get_rev()[1]
-                    master_rev = master_metas['rev']
+                    master_rev = master_metas['revision']
 
                     try:
                         rev_num = int(master_rev)
                     except ValueError:
-                        trans_status.append(_('/!\\ ##master_date special comment can\'t be parsed. Value of special comment: "%s". Please use correct revision number.', wiki=True) % request.formatter.text(master_rev))
+                        trans_status.append(_('/!\\ ##master-revision special comment can\'t be parsed. Value of special comment: "%s". Please use correct revision number.', wiki=True) % request.formatter.text(master_rev))
                     else:
                         if rev_num < orig_page_rev and translation_warnings['outdated_master_rev']:
                             trans_status.append(_('(!) Translated page is outdated: it is based on revision %(trans_rev)s, but original page has revision %(orig_rev)s.', wiki=True) % {
@@ -161,7 +161,7 @@
                             pass
 
                     if not master_date:
-                        trans_status.append(_('/!\\ ##master_date special comment can\'t be parsed. Value of special comment: "%s". Please use ISO format (yyyy-mm-dd HH:MM:SS) or @TIMESTAMP@ variable.', wiki=True) % request.formatter.text(master_metas['date']))
+                        trans_status.append(_('/!\\ ##master-date special comment can\'t be parsed. Value of special comment: "%s". Please use ISO format (yyyy-mm-dd HH:MM:SS) or @TIMESTAMP@ variable.', wiki=True) % request.formatter.text(master_metas['date']))
                     else:
                         orig_date = time.gmtime(orig_page.mtime_usecs() / 1000000.0)
                         orig_date_s = time.strftime('%Y-%m-%d %H:%M:%S', orig_date)