Skip to content

Commit

Permalink
force wrapwidth=0 for all scripts
Browse files Browse the repository at this point in the history
This a is way to "normalize" po files as much as possible.

Signed-off-by: Jean-Noël Avila <[email protected]>
  • Loading branch information
Jean-Noël Avila committed Feb 10, 2024
1 parent 2899583 commit 8a1c8a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/check_po
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ FALSE_POSITIVES = re.compile('example\\.(com|org)|git-(related|foo|branch|rev-li
def main(filename: str, modify: bool = False):
'''check that the segments that contain known fixed strings are translated with the same fixed strings '''

po = polib.pofile(filename)
po = polib.pofile(filename, wrapwidth=0)
modified = False
for entry in po:
if entry.msgstr != "" and not entry.obsolete and not entry.fuzzy:
Expand Down
2 changes: 1 addition & 1 deletion scripts/pre-translate-po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def main (f, d=None):
quoted_re = re.compile(r'\'?%[a-zA-Z]+\'?|(`[a-zA-Z-_]+`(, )?)+|\'(oneline|short|medium|full(er)?|email|raw|(un)?set|unspecified|init|fetch|clone|rebase|dcommit|branch|tag|log|blame|find-rev|set-tree|(create|show)-ignore|mkdirs|commit-diff)\'|(user|transfer|submodule|stash|status|splitIndex|showbranch|sendemail|repack|remote|receive|push|merge(tool)?|mailinfo|log|interactive|instaweb|i18n|help|gui|gitweb|fastimport|format|fetch|diff(tool)?|credential|commit|column|core|branch|apply|color|git-p4)\.[a-zA-Z_.]+|araxis|bc[34]?|codecompare|deltawalker|guiffy|meld|diff(use|merge)|(exam|[gn]?vim|t?k|open|xx)?diff[123]?|(ec?|p4|s|tortoise|win)merge|update|create|delete|verify|option|resolve|recursive|octopus|ours|subtree|theirs|patience|diff-algorithm=\[[a-z\|]+\]|ignore-(space-change|all-space|(cr|space)-at-eol)|(no-)?renormalize|no-renames|no|default|plain|blocks|(dimmed-)?zebra|allow-indentation-change|color|porcelain|none|list|(un)?lock|(re)?move|prune|die|usage|set_reflog_action|git_editor|cd_to_toplevel|require_work_tree(_exists)?|get_author_ident_from_commit|create_virtual_base|add|copy|append|edit|show|merge|get-ref')
env_var_re = re.compile(r'`?GIT_[A-Z_\d]+`?')
if not d is None:
po_file=polib.pofile(d)
po_file=polib.pofile(d, wrapwidth=0)
pod = [(re.compile(entry.msgid), entry.msgstr) for entry in po_file]
for entry in po:
if option_re.fullmatch(entry.msgid) \
Expand Down

0 comments on commit 8a1c8a3

Please sign in to comment.