Commit 4317f44c authored by Kai Willadsen's avatar Kai Willadsen

Merge branch 'master' into Gio; includes non-trivial binary open merge

parents e1d183f6 5d213640
......@@ -87,7 +87,7 @@
<td><p>Find the next instance of the string.</p></td>
</tr>
<tr>
<td><p><keyseq><key>Alt</key><key>Up</key></keyseq></p></td>
<td><p><keyseq><key>Alt</key><key>Down</key></keyseq></p></td>
<td><p>Go to the next difference.
(Also <keyseq><key>Ctrl</key><key>D</key></keyseq>)
</p></td>
......
......@@ -71,8 +71,8 @@ class StatItem(namedtuple('StatItem', 'mode size time')):
if abs(self.time - other.time) > 2:
return False
dectime1 = Decimal(str(self.time)).scaleb(Decimal(9)).quantize(1)
dectime2 = Decimal(str(other.time)).scaleb(Decimal(9)).quantize(1)
dectime1 = Decimal(self.time).scaleb(Decimal(9)).quantize(1)
dectime2 = Decimal(other.time).scaleb(Decimal(9)).quantize(1)
mtime1 = dectime1 // time_resolution_ns
mtime2 = dectime2 // time_resolution_ns
......
......@@ -1080,6 +1080,29 @@ class FileDiff(melddoc.MeldDoc, gnomeglade.Component):
buf.data.encoding = loader.get_encoding()
buf.data.newlines = loader.get_newline_type()
start, end = buf.get_bounds()
buffer_text = buf.get_text(start, end, False)
if not buf.data.encoding and '\\00' in buffer_text:
primary = _("File %s appears to be a binary file.") % filename
secondary = _(
"Do you want to open the file using the default application?")
msgarea = self.msgarea_mgr[pane].new_from_text_and_icon(
Gtk.STOCK_DIALOG_WARNING, primary, secondary)
msgarea.add_button(_("Open"), Gtk.ResponseType.ACCEPT)
msgarea.add_button(_("Hi_de"), Gtk.ResponseType.CLOSE)
def make_binary_callback(pane, filename):
def on_binary_file_open(msgarea, response_id, *args):
self.msgarea_mgr[pane].clear()
if response_id == Gtk.ResponseType.ACCEPT:
self._open_files([filename])
return on_binary_file_open
return on_binary_file_open
msgarea.connect(
"response", make_binary_callback(pane, gfile.get_path()))
msgarea.show_all()
self.update_buffer_writable(buf)
self.undosequence.checkpoint(buf)
......
......@@ -34,6 +34,12 @@ from meld.conf import _
log = logging.getLogger(__name__)
# Monkeypatching optparse like this is obviously awful, but this is to
# handle Unicode translated strings within optparse itself that will
# otherwise crash badly. This just makes optparse use our ugettext
# import of _, rather than the non-unicode gettext.
optparse._ = _
class MeldApp(Gtk.Application):
......
......@@ -13,8 +13,8 @@ msgstr ""
"Project-Id-Version: meld.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=meld&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2015-07-29 10:46+0000\n"
"PO-Revision-Date: 2015-08-03 \n"
"POT-Creation-Date: 2015-08-11 22:47+0000\n"
"PO-Revision-Date: 2015-08-12 \n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: Spanish <gnome-es-list@gnome.org>\n"
"Language: es\n"
......@@ -484,7 +484,6 @@ msgid "Meld base scheme"
msgstr "Esquema base de Meld"
#: ../data/styles/meld-base.xml.h:2
#| msgid "Color scheme to use for syntax highlighting"
msgid "Base color scheme for Meld highlighting"
msgstr "Esquema de color para el resaltado de Meld"
......@@ -493,7 +492,6 @@ msgid "Meld dark scheme"
msgstr "Esquema oscuro de Meld"
#: ../data/styles/meld-dark.xml.h:2
#| msgid "Color scheme to use for syntax highlighting"
msgid "Dark color scheme for Meld highlighting"
msgstr "Esquema de color oscuro para el resaltado de Meld"
......@@ -564,7 +562,7 @@ msgstr "Copiar a la derecha"
msgid "Delete selected"
msgstr "Eliminar seleccionados"
#: ../data/ui/dirdiff.ui.h:8 ../meld/dirdiff.py:854 ../meld/filediff.py:1406
#: ../data/ui/dirdiff.ui.h:8 ../meld/dirdiff.py:856 ../meld/filediff.py:1406
msgid "Hide"
msgstr "Ocultar"
......@@ -633,7 +631,7 @@ msgid "_Add"
msgstr "_Añadir"
#: ../data/ui/EditableList.ui.h:5 ../data/ui/vcview.ui.h:11
#: ../meld/vcview.py:645
#: ../meld/vcview.py:647
msgid "_Remove"
msgstr "_Eliminar"
......@@ -858,7 +856,7 @@ msgstr "Los cambios se perderán permanentemente si no los guarda."
msgid "Close _without Saving"
msgstr "Cerrar _sin guardar"
#: ../data/ui/filediff.ui.h:47 ../meld/dirdiff.py:945 ../meld/filediff.py:1472
#: ../data/ui/filediff.ui.h:47 ../meld/dirdiff.py:947 ../meld/filediff.py:1472
#: ../meld/filediff.py:1556 ../meld/filediff.py:1581
msgid "_Cancel"
msgstr "_Cancelar"
......@@ -898,7 +896,7 @@ msgstr ""
"Los cambios realizados a los siguientes documentos se perderán para "
"siempre:\n"
#: ../data/ui/findbar.ui.h:1 ../meld/dirdiff.py:946 ../meld/filediff.py:1473
#: ../data/ui/findbar.ui.h:1 ../meld/dirdiff.py:948 ../meld/filediff.py:1473
msgid "_Replace"
msgstr "_Reemplazar"
......@@ -1222,7 +1220,7 @@ msgstr "Seleccionar una carpeta bajo control de versiones"
#: ../data/ui/tab-placeholder.ui.h:13
msgid "_Blank comparison"
msgstr "_Limpiar comparación"
msgstr "_Comparación en blanco"
#: ../data/ui/tab-placeholder.ui.h:14
msgid "C_ompare"
......@@ -1410,25 +1408,25 @@ msgstr "Permisos"
msgid "Hide %s"
msgstr "Ocultar %s"
#: ../meld/dirdiff.py:666 ../meld/dirdiff.py:688
#: ../meld/dirdiff.py:668 ../meld/dirdiff.py:690
#, python-format
msgid "[%s] Scanning %s"
msgstr "[%s] Buscando %s"
#: ../meld/dirdiff.py:821
#: ../meld/dirdiff.py:823
#, python-format
msgid "[%s] Done"
msgstr "[%s] Hecho"
#: ../meld/dirdiff.py:829
#: ../meld/dirdiff.py:831
msgid "Folders have no differences"
msgstr "No hay diferencias entre las carpetas"
#: ../meld/dirdiff.py:831
#: ../meld/dirdiff.py:833
msgid "Contents of scanned files in folders are identical."
msgstr "El contenido de los archivos analizados en carpetas es idéntico."
#: ../meld/dirdiff.py:833
#: ../meld/dirdiff.py:835
msgid ""
"Scanned files in folders appear identical, but contents have not been "
"scanned."
......@@ -1436,45 +1434,45 @@ msgstr ""
"Los archivos analizados en las carpetas parecen idénticos, pero no se ha "
"analizado el contenido."
#: ../meld/dirdiff.py:836
#: ../meld/dirdiff.py:838
msgid "File filters are in use, so not all files have been scanned."
msgstr ""
"Se están usando filtros de archivos, por lo que no se han analizado todos "
"los archivos."
#: ../meld/dirdiff.py:838
#: ../meld/dirdiff.py:840
msgid "Text filters are in use and may be masking content differences."
msgstr ""
"Se están usando filtros de texto, y pueden estar ocultando diferencias entre "
"archivos."
#: ../meld/dirdiff.py:856 ../meld/dirdiff.py:909 ../meld/filediff.py:1061
#: ../meld/dirdiff.py:858 ../meld/dirdiff.py:911 ../meld/filediff.py:1061
#: ../meld/filediff.py:1213 ../meld/filediff.py:1408 ../meld/filediff.py:1438
#: ../meld/filediff.py:1440
msgid "Hi_de"
msgstr "_Ocultar"
#: ../meld/dirdiff.py:866
#: ../meld/dirdiff.py:868
msgid "Multiple errors occurred while scanning this folder"
msgstr "Ocurrieron varios errores al escanear esta carpeta"
#: ../meld/dirdiff.py:867
#: ../meld/dirdiff.py:869
msgid "Files with invalid encodings found"
msgstr "Se encontraron archivos con codificaciones no válidas"
#. TRANSLATORS: This is followed by a list of files
#: ../meld/dirdiff.py:869
#: ../meld/dirdiff.py:871
msgid "Some files were in an incorrect encoding. The names are something like:"
msgstr ""
"Algunos archivos tienen una codificación incorrecta. Los nombres son como "
"esto:"
#: ../meld/dirdiff.py:871
#: ../meld/dirdiff.py:873
msgid "Files hidden by case insensitive comparison"
msgstr "Archivos ocultos por una comparación no sensible a capitalización"
#. TRANSLATORS: This is followed by a list of files
#: ../meld/dirdiff.py:873
#: ../meld/dirdiff.py:875
msgid ""
"You are running a case insensitive comparison on a case sensitive "
"filesystem. The following files in this folder are hidden:"
......@@ -1483,17 +1481,17 @@ msgstr ""
"sensible a capitalización. Los siguientes archivos de esta carpeta archivos "
"están ocultos:"
#: ../meld/dirdiff.py:884
#: ../meld/dirdiff.py:886
#, python-format
msgid "'%s' hidden by '%s'"
msgstr "«%s» oculto por «%s»"
#: ../meld/dirdiff.py:949
#: ../meld/dirdiff.py:951
#, python-format
msgid "Replace folder “%s”?"
msgstr "¿Reemplazar la carpeta «%s»?"
#: ../meld/dirdiff.py:951
#: ../meld/dirdiff.py:953
#, python-format
msgid ""
"Another folder with the same name already exists in “%s”.\n"
......@@ -1502,11 +1500,11 @@ msgstr ""
"Ya existe otra carpeta con el mismo nombre en «%s».\n"
"Si reemplaza la carpeta existente, se perderán todos sus archivos."
#: ../meld/dirdiff.py:964
#: ../meld/dirdiff.py:966
msgid "Error copying file"
msgstr "Error al copiar el archivo"
#: ../meld/dirdiff.py:965
#: ../meld/dirdiff.py:967
#, python-format
msgid ""
"Couldn't copy %s\n"
......@@ -1519,12 +1517,12 @@ msgstr ""
"\n"
"%s"
#: ../meld/dirdiff.py:988
#: ../meld/dirdiff.py:990
#, python-format
msgid "Error deleting %s"
msgstr "Error al eliminar %s"
#: ../meld/dirdiff.py:1493
#: ../meld/dirdiff.py:1495
msgid "No folder"
msgstr "No hay ninguna carpeta"
......@@ -2248,7 +2246,6 @@ msgstr "No presente"
#. control binary isn't installed.
#: ../meld/vcview.py:254
#, python-format
#| msgid "%s not installed"
msgid "%(name)s (%(cmd)s not installed)"
msgstr "%(name)s (%(cmd)s no está instalado)"
......@@ -2256,7 +2253,6 @@ msgstr "%(name)s (%(cmd)s no está instalado)"
#. controlled repository is invalid.
#: ../meld/vcview.py:258
#, python-format
#| msgid "Invalid repository"
msgid "%(name)s (Invalid repository)"
msgstr "%(name)s (Repositorio no válido)"
......@@ -2285,50 +2281,50 @@ msgstr "%s: %s"
msgid "Scanning %s"
msgstr "Analizando %s"
#: ../meld/vcview.py:393
#: ../meld/vcview.py:395
msgid "(Empty)"
msgstr "(Vacío)"
#: ../meld/vcview.py:437
#: ../meld/vcview.py:439
#, python-format
msgid "%s — local"
msgstr "%s — local"
#: ../meld/vcview.py:438
#: ../meld/vcview.py:440
#, python-format
msgid "%s — remote"
msgstr "%s — remoto"
#: ../meld/vcview.py:446
#: ../meld/vcview.py:448
#, python-format
msgid "%s (local, merge, remote)"
msgstr "%s (local, mezcla, remoto)"
#: ../meld/vcview.py:451
#: ../meld/vcview.py:453
#, python-format
msgid "%s (remote, merge, local)"
msgstr "%s (remoto, mezcla, local)"
#: ../meld/vcview.py:462
#: ../meld/vcview.py:464
#, python-format
msgid "%s — repository"
msgstr "%s — repositorio"
#: ../meld/vcview.py:468
#: ../meld/vcview.py:470
#, python-format
msgid "%s (working, repository)"
msgstr "%s (funcionando, repositorio)"
#: ../meld/vcview.py:472
#: ../meld/vcview.py:474
#, python-format
msgid "%s (repository, working)"
msgstr "%s (repositorio, funcionando)"
#: ../meld/vcview.py:639
#: ../meld/vcview.py:641
msgid "Remove folder and all its files?"
msgstr "¿Quitar la carpeta y todos sus archivos?"
#: ../meld/vcview.py:641
#: ../meld/vcview.py:643
msgid ""
"This will remove all selected files and folders, and all files within any "
"selected folders, from version control."
......@@ -2336,12 +2332,12 @@ msgstr ""
"Esto quitará todos los archivos y carpetas seleccionadas, y todos los "
"archivos de las carpetas seleccionadas, del control de versiones."
#: ../meld/vcview.py:666
#: ../meld/vcview.py:668
#, python-format
msgid "Error removing %s"
msgstr "Error al quitar %s"
#: ../meld/vcview.py:746
#: ../meld/vcview.py:748
msgid "Clear"
msgstr "Limpiar"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python
#!/usr/bin/env python2
from distutils.core import setup
import glob
......@@ -50,6 +50,9 @@ setup(
glob.glob("data/icons/*.png") +
glob.glob("data/icons/COPYING*")
),
('share/meld/styles',
glob.glob("data/styles/*.xml")
),
('share/meld/ui',
glob.glob("data/ui/*.ui") + glob.glob("data/ui/*.xml")
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment