[Debian-l10n-commits] r1867 - in /virtaal/trunk: ./ debian/ share/virtaal/ virtaal/ virtaal/controllers/ virtaal/plugins/terminology/models/localfile/ virtaal/views/ virtaal/views/widgets/
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Mon Aug 10 19:41:52 UTC 2009
Author: nekral-guest
Date: Mon Aug 10 19:41:51 2009
New Revision: 1867
URL: http://svn.debian.org/wsvn/?sc=1&rev=1867
Log:
New upstream release.
Modified:
virtaal/trunk/PKG-INFO
virtaal/trunk/debian/changelog
virtaal/trunk/debian/control
virtaal/trunk/share/virtaal/virtaal.glade
virtaal/trunk/virtaal/__version__.py
virtaal/trunk/virtaal/controllers/placeablescontroller.py
virtaal/trunk/virtaal/controllers/undocontroller.py
virtaal/trunk/virtaal/controllers/unitcontroller.py
virtaal/trunk/virtaal/plugins/terminology/models/localfile/__init__.py
virtaal/trunk/virtaal/views/mainview.py
virtaal/trunk/virtaal/views/unitview.py
virtaal/trunk/virtaal/views/widgets/textbox.py
Modified: virtaal/trunk/PKG-INFO
URL: http://svn.debian.org/wsvn/virtaal/trunk/PKG-INFO?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/PKG-INFO (original)
+++ virtaal/trunk/PKG-INFO Mon Aug 10 19:41:51 2009
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: virtaal
-Version: 0.4.0-rc2
+Version: 0.4.0
Summary: A tool to create program translations.
Home-page: http://translate.sourceforge.net/wiki/virtaal/index
Author: Translate.org.za
Modified: virtaal/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/virtaal/trunk/debian/changelog?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/debian/changelog (original)
+++ virtaal/trunk/debian/changelog Mon Aug 10 19:41:51 2009
@@ -1,3 +1,9 @@
+virtaal (0.4.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Nicolas FRANCOIS (Nekral) <nicolas.francois at centraliens.net> Mon, 10 Aug 2009 21:16:09 +0200
+
virtaal (0.4.0~rc2-1) experimental; urgency=low
* New upstream release
Modified: virtaal/trunk/debian/control
URL: http://svn.debian.org/wsvn/virtaal/trunk/debian/control?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/debian/control (original)
+++ virtaal/trunk/debian/control Mon Aug 10 19:41:51 2009
@@ -12,7 +12,7 @@
Package: virtaal
Architecture: all
-Depends: ${python:Depends}, translate-toolkit (>= 1.4.0~rc1), python-gtk2, python-gobject, python-glade2, python-pycurl, python-lxml, python-simplejson
+Depends: ${python:Depends}, translate-toolkit (>= 1.4.0), python-gtk2, python-gobject, python-glade2, python-pycurl, python-lxml, python-simplejson
Recommends: python-gnome2-extras, openoffice.org-common, python-levenshtein
XB-Python-Version: ${python:Versions}
Description: graphical localisation editor
Modified: virtaal/trunk/share/virtaal/virtaal.glade
URL: http://svn.debian.org/wsvn/virtaal/trunk/share/virtaal/virtaal.glade?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/share/virtaal/virtaal.glade (original)
+++ virtaal/trunk/share/virtaal/virtaal.glade Mon Aug 10 19:41:51 2009
@@ -1123,7 +1123,7 @@
<widget class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
+ <property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
Modified: virtaal/trunk/virtaal/__version__.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/__version__.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/__version__.py (original)
+++ virtaal/trunk/virtaal/__version__.py Mon Aug 10 19:41:51 2009
@@ -19,4 +19,4 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
"""This file contains the version."""
-ver = "0.4.0-rc2"
+ver = "0.4.0"
Modified: virtaal/trunk/virtaal/controllers/placeablescontroller.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/controllers/placeablescontroller.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/controllers/placeablescontroller.py (original)
+++ virtaal/trunk/virtaal/controllers/placeablescontroller.py Mon Aug 10 19:41:51 2009
@@ -77,10 +77,6 @@
self.parser_info = {}
# Test for presence of parser classes by hand
- self.parser_info[general.AltAttrPlaceable.parse] = (
- _('"alt" Attributes'),
- _('Placeable for "alt" attributes (as found in HTML)')
- )
self.parser_info[general.CamelCasePlaceable.parse] = (
#l10n: See http://en.wikipedia.org/wiki/CamelCase
_('CamelCase'),
@@ -140,6 +136,10 @@
# This code should eventually be used to add the SpacesPlaceable, but
# it is not working well yet. We add the strings for translation so
# that we won't need to break the string freeze later when it works.
+# self.parser_info[general.AltAttrPlaceable.parse] = (
+# _('"alt" Attributes'),
+# _('Placeable for "alt" attributes (as found in HTML)')
+# )
# self.parser_info[general.SpacesPlaceable.parse] = (
# _('Spaces'),
# _('Double spaces and spaces in unexpected positions')
@@ -147,6 +147,8 @@
_('Spaces'),
_('Double spaces and spaces in unexpected positions')
+ _('"alt" Attributes'),
+ _('Placeable for "alt" attributes (as found in HTML)')
# METHODS #
Modified: virtaal/trunk/virtaal/controllers/undocontroller.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/controllers/undocontroller.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/controllers/undocontroller.py (original)
+++ virtaal/trunk/virtaal/controllers/undocontroller.py Mon Aug 10 19:41:51 2009
@@ -195,13 +195,11 @@
self._perform_undo(undo_info)
@if_enabled
- def _on_unit_delete_text(self, unit_controller, unit, start_offset, end_offset, deleted, parent, offset, elem, target_num):
+ def _on_unit_delete_text(self, unit_controller, unit, deleted, parent, offset, cursor_pos, elem, target_num):
if self._paste_undo_info:
self.model.push(self._paste_undo_info)
self._paste_undo_info = None
return
-
- #logging.debug('_on_unit_delete_text(offsets=(%d, %d), deleted="%s", elem=%s, target_n=%d)' % (start_offset, end_offset, deleted, repr(elem), target_num))
def undo_action(unit):
#logging.debug('(undo) %s.insert(%d, "%s")' % (repr(elem), start_offset, deleted))
@@ -217,10 +215,10 @@
else:
del_length = len(deleted)
- desc = 'offsets=(%d, %d), offset=%d, deleted="%s", parent=%s, elem=%s' % (start_offset, end_offset, offset, repr(deleted), repr(parent), repr(elem))
+ desc = 'offset=%d, deleted="%s", parent=%s, cursor_pos=%d, elem=%s' % (offset, repr(deleted), repr(parent), cursor_pos, repr(elem))
self.model.push({
'action': undo_action,
- 'cursorpos': start_offset + del_length,
+ 'cursorpos': cursor_pos,
'desc': desc,
'targetn': target_num,
'unit': unit,
Modified: virtaal/trunk/virtaal/controllers/unitcontroller.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/controllers/unitcontroller.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/controllers/unitcontroller.py (original)
+++ virtaal/trunk/virtaal/controllers/unitcontroller.py Mon Aug 10 19:41:51 2009
@@ -33,7 +33,7 @@
__gsignals__ = {
'unit-done': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, int)),
'unit-modified': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT,)),
- 'unit-delete-text': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, int, int, TYPE_PYOBJECT, TYPE_PYOBJECT, int, TYPE_PYOBJECT, int)),
+ 'unit-delete-text': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, TYPE_PYOBJECT, TYPE_PYOBJECT, int, int, TYPE_PYOBJECT, int)),
'unit-insert-text': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, TYPE_PYOBJECT, int, TYPE_PYOBJECT, int)),
'unit-paste-start': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, TYPE_PYOBJECT, TYPE_PYOBJECT, int)),
}
@@ -84,8 +84,8 @@
self.view.load_unit(unit)
return self.view
- def _unit_delete_text(self, unitview, start_offset, end_offset, deleted, parent, cursor_pos, elem, target_num):
- self.emit('unit-delete-text', self.current_unit, start_offset, end_offset, deleted, parent, cursor_pos, elem, target_num)
+ def _unit_delete_text(self, unitview, deleted, parent, offset, cursor_pos, elem, target_num):
+ self.emit('unit-delete-text', self.current_unit, deleted, parent, offset, cursor_pos, elem, target_num)
def _unit_insert_text(self, unitview, ins_text, offset, elem, target_num):
self.emit('unit-insert-text', self.current_unit, ins_text, offset, elem, target_num)
Modified: virtaal/trunk/virtaal/plugins/terminology/models/localfile/__init__.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/plugins/terminology/models/localfile/__init__.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/plugins/terminology/models/localfile/__init__.py (original)
+++ virtaal/trunk/virtaal/plugins/terminology/models/localfile/__init__.py Mon Aug 10 19:41:51 2009
@@ -83,7 +83,17 @@
def load_config(self):
super(TerminologyModel, self).load_config()
- self.config['files'] = self.config['files'].split(',')
+ conffiles = []
+ for filename in self.config['files'].split(','):
+ if os.path.exists(filename):
+ conffiles.append(filename)
+ self.config['files'] = conffiles
+
+ if not os.path.exists(self.config['extendfile']) and len(self.config['files']) > 0:
+ self.config['extendfile'] = self.config['files'][0]
+
+ if not os.path.exists(self.config['extendfile']):
+ self.config['extendfile'] = self.default_config['extendfile']
if not self.config['extendfile'] in self.config['files']:
self.config['files'].append(self.config['extendfile'])
Modified: virtaal/trunk/virtaal/views/mainview.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/views/mainview.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/views/mainview.py (original)
+++ virtaal/trunk/virtaal/views/mainview.py Mon Aug 10 19:41:51 2009
@@ -267,9 +267,9 @@
gtk.BUTTONS_NONE,
_("The current file has been modified.\nDo you want to save your changes?")
)
- self.confirm_dialog.add_buttons(gtk.STOCK_SAVE, RESPONSE_SAVE)
- self.confirm_dialog.add_buttons(_("_Discard"), RESPONSE_DISCARD)
- self.confirm_dialog.add_buttons(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
+ self.confirm_dialog.__save_button = self.confirm_dialog.add_button(gtk.STOCK_SAVE, RESPONSE_SAVE)
+ self.confirm_dialog.add_button(_("_Discard"), RESPONSE_DISCARD)
+ self.confirm_dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
self.confirm_dialog.set_default_response(RESPONSE_SAVE)
def _setup_key_bindings(self):
@@ -512,6 +512,7 @@
self.confirm_dialog.set_transient_for(self._top_window)
old_top = self._top_window
self._top_window = self.confirm_dialog
+ self.confirm_dialog.__save_button.grab_focus()
response = self.confirm_dialog.run()
self.confirm_dialog.hide()
self._top_window = old_top
Modified: virtaal/trunk/virtaal/views/unitview.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/views/unitview.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/views/unitview.py (original)
+++ virtaal/trunk/virtaal/views/unitview.py Mon Aug 10 19:41:51 2009
@@ -42,7 +42,7 @@
__gtype_name__ = "UnitView"
__gsignals__ = {
- 'delete-text': (SIGNAL_RUN_FIRST, None, (int, int, TYPE_PYOBJECT, TYPE_PYOBJECT, int, TYPE_PYOBJECT, int)),
+ 'delete-text': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, TYPE_PYOBJECT, int, int, TYPE_PYOBJECT, int)),
'insert-text': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, int, TYPE_PYOBJECT, int)),
'paste-start': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT, TYPE_PYOBJECT, int)),
'modified': (SIGNAL_RUN_FIRST, None, ()),
@@ -577,7 +577,7 @@
if i < nplurals:
# plural forms already in file
targetstr = u''
- if (i < rich_target_len) or not targetstr[i] is None:
+ if (i < rich_target_len) or not rich_target[i] is None:
targetstr = rich_target[i]
self.targets[i].modify_font(rendering.get_target_font_description())
self.targets[i].set_text(targetstr)
@@ -650,9 +650,9 @@
#logging.debug('emit("insert-text", ins_text="%s", offset=%d, elem=%s, target_num=%d)' % (ins_text, offset, repr(elem), target_num))
self.emit('insert-text', ins_text, offset, elem, target_num)
- def _on_target_delete_range(self, textbox, start_offset, end_offset, deleted, parent, cursor_pos, elem, target_num):
+ def _on_target_delete_range(self, textbox, deleted, parent, offset, cursor_pos, elem, target_num):
#logging.debug('emit("delete-text", start_offset=%d, end_offset=%d, cursor_pos=%d, elem=%s, target_num=%d)' % (old_text, start_offset, end_offset, cursor_pos, repr(elem), target_num))
- self.emit('delete-text', start_offset, end_offset, deleted, parent, cursor_pos, elem, target_num)
+ self.emit('delete-text', deleted, parent, offset, cursor_pos, elem, target_num)
def _on_textbox_paste_clipboard(self, textbox, target_num):
buff = textbox.buffer
Modified: virtaal/trunk/virtaal/views/widgets/textbox.py
URL: http://svn.debian.org/wsvn/virtaal/trunk/virtaal/views/widgets/textbox.py?rev=1867&op=diff
==============================================================================
--- virtaal/trunk/virtaal/views/widgets/textbox.py (original)
+++ virtaal/trunk/virtaal/views/widgets/textbox.py Mon Aug 10 19:41:51 2009
@@ -41,7 +41,7 @@
'before-apply-gui-info': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT,)),
'element-selected': (SIGNAL_RUN_FIRST, None, (TYPE_PYOBJECT,)),
'key-pressed': (SIGNAL_RUN_LAST, bool, (TYPE_PYOBJECT, str)),
- 'text-deleted': (SIGNAL_RUN_LAST, bool, (int, int, TYPE_PYOBJECT, TYPE_PYOBJECT, int, TYPE_PYOBJECT)),
+ 'text-deleted': (SIGNAL_RUN_LAST, bool, (TYPE_PYOBJECT, TYPE_PYOBJECT, int, int, TYPE_PYOBJECT)),
'text-inserted': (SIGNAL_RUN_LAST, bool, (TYPE_PYOBJECT, int, TYPE_PYOBJECT)),
}
@@ -545,7 +545,7 @@
# The table above specifies what should be deleted for editable and
# non-editable placeables when the cursor is at a specific boundry
# position (a, b, c, d) and a specified key is pressed (backspace or
- # delete).
+ # delete). Without widgets, positions b and c fall away.
#
# @ It is unnecessary to handle these cases, as long as control drops
# through to a place where it is handled below.
@@ -560,15 +560,13 @@
has_open_widget = len(widgets) >= 1 and widgets[0]
has_close_widget = len(widgets) >= 2 and widgets[1]
- if has_open_widget and cursor_pos == start_elem_offset:
+ if cursor_pos == start_elem_offset:
position = 'a'
- elif (has_open_widget and cursor_pos == start_elem_offset+1) or \
- (not has_open_widget and cursor_pos == start_elem_offset):
+ elif has_open_widget and cursor_pos == start_elem_offset+1:
position = 'b'
- elif (has_close_widget and cursor_pos == start_elem_offset + start_elem_len - 1) or \
- (not has_close_widget and cursor_pos == start_elem_offset + start_elem_len):
+ elif has_close_widget and cursor_pos == start_elem_offset + start_elem_len - 1:
position = 'c'
- elif has_close_widget and cursor_pos == start_elem_offset + start_elem_len:
+ elif cursor_pos == start_elem_offset + start_elem_len:
position = 'd'
# If the current state is in the table, handle it
@@ -579,7 +577,8 @@
pass
elif (position == 'a' and key_is_delete) or (position == 'd' and not key_is_delete):
# "Placeable" fields
- if hasattr(start_elem, 'gui_info') and start_elem.gui_info.widgets and start_elem.gui_info.widgets[0]:
+ if (position == 'a' and (has_open_widget or not start_elem.iseditable)) or \
+ (position == 'd' and (has_close_widget or not start_elem.iseditable)):
deleted = start_elem.copy()
parent = self.elem.get_parent_elem(start_elem)
index = parent.elem_offset(start_elem)
@@ -620,6 +619,9 @@
if index is not None:
parent_offset = self.elem.gui_info.index(parent)
+ if parent_offset < 0:
+ parent_offset = 0
+
if hasattr(deleted, 'gui_info'):
length = deleted.gui_info.length()
else:
@@ -634,8 +636,8 @@
if deleted:
self.elem.prune()
self.emit(
- 'text-deleted', start_offset, end_offset,
- deleted, parent, index, self.elem
+ 'text-deleted', deleted, parent, index,
+ self.buffer.props.cursor_position, self.elem
)
def _on_insert_text(self, buffer, iter, ins_text, length):
More information about the Debian-l10n-commits
mailing list