[meld: 3/5] Removed unneeded unicode prefixes
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld: 3/5] Removed unneeded unicode prefixes
- Date: Thu, 7 Jun 2018 22:43:58 +0000 (UTC)
commit 6eccd6f98db3de709dd002065c9abef18d9e121b
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Jun 4 18:59:58 2018 +0200
Removed unneeded unicode prefixes
meld/dirdiff.py | 10 +++++-----
meld/filediff.py | 18 +++++++++---------
meld/meldbuffer.py | 4 ++--
meld/vc/bzr.py | 2 +-
meld/vcview.py | 14 +++++++-------
5 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 7234a559..2811d5fb 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -953,12 +953,12 @@ class DirDiff(MeldDoc, Component):
(_("_Replace"), Gtk.ResponseType.OK),
]
replace = misc.modal_dialog(
- primary=_(u"Replace folder “%s”?") % folder_name,
+ primary=_("Replace folder “%s”?") % folder_name,
secondary=_(
- u"Another folder with the same name already "
- u"exists in “%s”.\n"
- u"If you replace the existing folder, all "
- u"files in it will be lost.") % parent_name,
+ "Another folder with the same name already "
+ "exists in “%s”.\n"
+ "If you replace the existing folder, all "
+ "files in it will be lost.") % parent_name,
buttons=dialog_buttons,
messagetype=Gtk.MessageType.WARNING,
)
diff --git a/meld/filediff.py b/meld/filediff.py
index 682af4f8..e1a811a7 100644
--- a/meld/filediff.py
+++ b/meld/filediff.py
@@ -813,11 +813,11 @@ class FileDiff(MeldDoc, Component):
except AssertionError:
if not self.warned_bad_comparison:
misc.error_dialog(
- primary=_(u"Comparison results will be inaccurate"),
+ primary=_("Comparison results will be inaccurate"),
secondary=_(
- u"A filter changed the number of lines in the "
- u"file, which is unsupported. The comparison will "
- u"not be accurate."),
+ "A filter changed the number of lines in the "
+ "file, which is unsupported. The comparison will "
+ "not be accurate."),
)
self.warned_bad_comparison = True
@@ -1185,7 +1185,7 @@ class FileDiff(MeldDoc, Component):
filename = GLib.markup_escape_text(
gfile.get_parse_name())
primary = _(
- u"There was a problem opening the file “%s”." % filename)
+ "There was a problem opening the file “%s”." % filename)
self.msgarea_mgr[pane].add_dismissable_msg(
'dialog-error-symbolic', primary, err.message)
@@ -1581,11 +1581,11 @@ class FileDiff(MeldDoc, Component):
(_("_Save as UTF-8"), Gtk.ResponseType.OK),
]
reencode = misc.modal_dialog(
- primary=_(u"Couldn’t encode text as “%s”") % encoding,
+ primary=_("Couldn’t encode text as “%s”") % encoding,
secondary=_(
- u"File “%s” contains characters that can’t be encoded "
- u"using encoding “%s”.\n"
- u"Would you like to save as UTF-8?") % (
+ "File “%s” contains characters that can’t be encoded "
+ "using encoding “%s”.\n"
+ "Would you like to save as UTF-8?") % (
bufdata.label, encoding),
buttons=dialog_buttons,
messagetype=Gtk.MessageType.WARNING
diff --git a/meld/meldbuffer.py b/meld/meldbuffer.py
index 243194a4..515400c5 100644
--- a/meld/meldbuffer.py
+++ b/meld/meldbuffer.py
@@ -121,7 +121,7 @@ class MeldBufferData(GObject.GObject):
@property
def label(self):
# TRANSLATORS: This is the label of a new, currently-unnamed file.
- return self._label or _(u"<unnamed>")
+ return self._label or _("<unnamed>")
@label.setter
def label(self, value):
@@ -266,7 +266,7 @@ class BufferLines(object):
if hi - lo != len(lines):
# These codepoints are considered line breaks by Python, but
# not by GtkTextStore.
- additional_breaks = set(('\x0c', '\x85', u'\u2028'))
+ additional_breaks = set(('\x0c', '\x85', '\u2028'))
i = 0
while i < len(ends):
line, end = lines[i], ends[i]
diff --git a/meld/vc/bzr.py b/meld/vc/bzr.py
index 48deabcc..65467584 100644
--- a/meld/vc/bzr.py
+++ b/meld/vc/bzr.py
@@ -39,7 +39,7 @@ class Vc(_vc.Vc):
VC_DIR = ".bzr"
PATCH_INDEX_RE = "^=== modified file '(.*)' (.*)$"
CONFLICT_RE = "conflict in (.*)$"
- RENAMED_RE = u"^(.*) => (.*)$"
+ RENAMED_RE = "^(.*) => (.*)$"
commit_statuses = (
_vc.STATE_MODIFIED, _vc.STATE_RENAMED, _vc.STATE_NEW, _vc.STATE_REMOVED
diff --git a/meld/vcview.py b/meld/vcview.py
index 72364329..447357f1 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -447,8 +447,8 @@ class VcView(MeldDoc, Component):
vc_entry = self.vc.get_entry(path)
if vc_entry and vc_entry.state == tree.STATE_CONFLICT and \
hasattr(self.vc, 'get_path_for_conflict'):
- local_label = _(u"%s — local") % basename
- remote_label = _(u"%s — remote") % basename
+ local_label = _("%s — local") % basename
+ remote_label = _("%s — remote") % basename
# We create new temp files for other, base and this, and
# then set the output to the current file.
@@ -456,12 +456,12 @@ class VcView(MeldDoc, Component):
conflicts = (tree.CONFLICT_THIS, tree.CONFLICT_MERGED,
tree.CONFLICT_OTHER)
meta['labels'] = (local_label, None, remote_label)
- meta['tablabel'] = _(u"%s (local, merge, remote)") % basename
+ meta['tablabel'] = _("%s (local, merge, remote)") % basename
else:
conflicts = (tree.CONFLICT_OTHER, tree.CONFLICT_MERGED,
tree.CONFLICT_THIS)
meta['labels'] = (remote_label, None, local_label)
- meta['tablabel'] = _(u"%s (remote, merge, local)") % basename
+ meta['tablabel'] = _("%s (remote, merge, local)") % basename
diffs = [self.vc.get_path_for_conflict(path, conflict=c)
for c in conflicts]
temps = [p for p, is_temp in diffs if is_temp]
@@ -472,17 +472,17 @@ class VcView(MeldDoc, Component):
}
meta['prompt_resolve'] = True
else:
- remote_label = _(u"%s — repository") % basename
+ remote_label = _("%s — repository") % basename
comp_path = self.vc.get_path_for_repo_file(path)
temps = [comp_path]
if self.props.left_is_local:
diffs = [path, comp_path]
meta['labels'] = (None, remote_label)
- meta['tablabel'] = _(u"%s (working, repository)") % basename
+ meta['tablabel'] = _("%s (working, repository)") % basename
else:
diffs = [comp_path, path]
meta['labels'] = (remote_label, None)
- meta['tablabel'] = _(u"%s (repository, working)") % basename
+ meta['tablabel'] = _("%s (repository, working)") % basename
kwargs = {}
kwargs['meta'] = meta
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]