gnome-games r8045 - in branches/gnome-2-24/glchess/src: . lib lib/gtkui
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8045 - in branches/gnome-2-24/glchess/src: . lib lib/gtkui
- Date: Wed, 15 Oct 2008 12:37:06 +0000 (UTC)
Author: rancell
Date: Wed Oct 15 12:37:06 2008
New Revision: 8045
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8045&view=rev
Log:
Added translator comments
Modified:
branches/gnome-2-24/glchess/src/glchess.in.in
branches/gnome-2-24/glchess/src/lib/gtkui/chessview.py
branches/gnome-2-24/glchess/src/lib/gtkui/dialogs.py
branches/gnome-2-24/glchess/src/lib/gtkui/gtkui.py
branches/gnome-2-24/glchess/src/lib/main.py
Modified: branches/gnome-2-24/glchess/src/glchess.in.in
==============================================================================
--- branches/gnome-2-24/glchess/src/glchess.in.in (original)
+++ branches/gnome-2-24/glchess/src/glchess.in.in Wed Oct 15 12:37:06 2008
@@ -42,10 +42,12 @@
import os.path
import gettext
from gettext import gettext as _
-
+
gettext.bindtextdomain('gnome-games', os.path.join('@prefix@', 'share', 'locale'))
gettext.textdomain('gnome-games')
+ # Translators: This is the title of the dialog displayed if glChess cannot start
title = _("Chess incorrectly installed")
+ # Translators: This is the contents of the dialog displayed if glChess cannot start
description = _("""Chess is not able to start because required application files are not installed. If you are currently upgrading your system please wait until the upgrade has completed.""")
try:
Modified: branches/gnome-2-24/glchess/src/lib/gtkui/chessview.py
==============================================================================
--- branches/gnome-2-24/glchess/src/lib/gtkui/chessview.py (original)
+++ branches/gnome-2-24/glchess/src/lib/gtkui/chessview.py Wed Oct 15 12:37:06 2008
@@ -14,11 +14,13 @@
try:
import OpenGL.GL
except:
+ # Translators: This message is displayed when 3D mode is not available due to no Python OpenGL libraries
openGLErrors.append(_('No Python OpenGL support'))
try:
import gtk.gtkgl
import gtk.gdkgl
except:
+ # Translators: This message is displayed when 3D mode is not available due to no Python GTKGLExt libraries
openGLErrors.append(_('No Python GTKGLExt support'))
else:
display_mode = (gtk.gdkgl.MODE_RGB | gtk.gdkgl.MODE_DEPTH | gtk.gdkgl.MODE_DOUBLE)
@@ -29,6 +31,7 @@
try:
glConfig = gtk.gdkgl.Config(mode = display_mode)
except gtk.gdkgl.NoMatches:
+ # Translators: This message is displayed when 3D mode is not available due to their 3D drivers not being able to provide a suitable display mode
openGLErrors.append(_('OpenGL libraries do not support required display mode'))
haveGLSupport = len(openGLErrors) == 0
@@ -461,35 +464,48 @@
self.ui._updateViewButtons()
def endGame(self, game):
+ # Translators: This message is displayed when a player wins. The %s is substituted with the winning player's name
+ format = _('%s wins')
+
# If game completed show this in the GUI
if game.result is glchess.game.RESULT_WHITE_WINS:
- title = _('%s wins') % game.getWhite().getName()
+ title = format % game.getWhite().getName()
elif game.result is glchess.game.RESULT_BLACK_WINS:
- title = _('%s wins') % game.getBlack().getName()
+ title = format % game.getBlack().getName()
else:
+ # Translators: This message is displayed when a game is drawn
title = _('Game is drawn')
description = ''
if game.rule is glchess.game.RULE_CHECKMATE:
+ # Translators: This message is displayed when the game ends due to a player being checkmated
description = _('Opponent is in check and cannot move (checkmate)')
elif game.rule is glchess.game.RULE_STALEMATE:
+ # Translators: This message is displayed when the game terminates due to a stalemate
description = _('Opponent cannot move (stalemate)')
elif game.rule is glchess.game.RULE_FIFTY_MOVES:
+ # Translators: This message is displayed when the game is drawn due to the fifty move rule
description = _('No piece has been taken or pawn moved in the last fifty moves')
elif game.rule is glchess.game.RULE_TIMEOUT:
+ # Translators: This message is displayed when the game ends due to one player's clock stopping
description = _('Opponent has run out of time')
elif game.rule is glchess.game.RULE_THREE_FOLD_REPETITION:
+ # Translators: This message is displayed when the game is drawn due to the three-fold-repitition rule
description = _('The same board state has occured three times (three fold repetition)')
elif game.rule is glchess.game.RULE_INSUFFICIENT_MATERIAL:
+ # Translators: This message is displayed when the game is drawn due to the insufficient material rule
description = _('Neither player can cause checkmate (insufficient material)')
elif game.rule is glchess.game.RULE_RESIGN:
if game.result is glchess.game.RESULT_WHITE_WINS:
+ # Translators: This message is displayed when the game ends due to the black player resigning
description = _('The black player has resigned')
elif game.result is glchess.game.RESULT_BLACK_WINS:
+ # Translators: This message is displayed when the game ends due to the white player resigning
description = _('The white player has resigned')
else:
assert(False)
elif game.rule is glchess.game.RULE_DEATH:
+ # Translators: This message is displayed when the game ends due to a player dying
description = _('One of the players has died')
self.gameResult = (title, description)
Modified: branches/gnome-2-24/glchess/src/lib/gtkui/dialogs.py
==============================================================================
--- branches/gnome-2-24/glchess/src/lib/gtkui/dialogs.py (original)
+++ branches/gnome-2-24/glchess/src/lib/gtkui/dialogs.py Wed Oct 15 12:37:06 2008
@@ -120,6 +120,7 @@
# Create model for game time
defaultTime = glchess.config.get('new_game_dialog/move_time')
+ # Translators: This is one of the options game duration combo box in the new game dialog
times = [(_('Unlimited'), 0),
(_('One minute'), 60),
(_('Five minutes'), 300),
@@ -238,6 +239,7 @@
# Change title for loaded games
if g.path is not None:
+ # Translators: This is the title of the dialog when continuing a loaded game
self.window.set_title(_('Configure loaded game (%i moves)') % len(g.moves))
# Display warning if missing the AIs
@@ -296,7 +298,7 @@
if self.__customName:
name = self.__gui.get_widget('game_name_entry').get_text()
if len(name) == 0:
- # Next time the something changes generate a name
+ # Next time something changes generate a name
self.__customName = False
ready = False
@@ -304,6 +306,7 @@
else:
whiteName = self.__getComboData(self.__gui.get_widget('white_type_combo'), 2)
blackName = self.__getComboData(self.__gui.get_widget('black_type_combo'), 2)
+ # Translators: This is the default name for a new game. %(white) and %(black) are substituted for the names of the white and black players.
format = _('%(white)s versus %(black)s')
self.__gui.get_widget('game_name_entry').set_text(format % {'white': whiteName, 'black': blackName})
@@ -327,12 +330,14 @@
# Get the players
game.white.type = self.__getComboData(self.__gui.get_widget('white_type_combo'), 0)
if game.white.type == '':
+ # Translators: This is the default name for the white player
game.white.name = _('White')
else:
game.white.name = self.__getComboData(self.__gui.get_widget('white_type_combo'), 2)
game.white.level = self.__getComboData(self.__gui.get_widget('white_difficulty_combo'), 0)
game.black.type = self.__getComboData(self.__gui.get_widget('black_type_combo'), 0)
if game.black.type == '':
+ # Translators: This is the default name for the black player
game.black.name = _('Black')
else:
game.black.name = self.__getComboData(self.__gui.get_widget('black_type_combo'), 2)
@@ -442,6 +447,7 @@
fileName = self.__gui.get_widget('filechooserwidget').get_filename()
if fileName is None:
+ # Translators: This message is displayed in the load dialog when no file is selected
error = _('Please select a file to load')
else:
error = self.__mainUI.feedback.loadGame(fileName, responseId == gtk.RESPONSE_YES)
Modified: branches/gnome-2-24/glchess/src/lib/gtkui/gtkui.py
==============================================================================
--- branches/gnome-2-24/glchess/src/lib/gtkui/gtkui.py (original)
+++ branches/gnome-2-24/glchess/src/lib/gtkui/gtkui.py Wed Oct 15 12:37:06 2008
@@ -460,7 +460,9 @@
dialog = gtk.MessageDialog(flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
type = gtk.MESSAGE_WARNING,
message_format = title)
+ # Translators: This text is displayed in a dialog asking the user to save the current game
dialog.format_secondary_text("If you don't save the changes to this game will be permanently lost")
+ # Translators: This is the button text in the save game dialog to decline to save the game
dialog.add_button(_('Close _without saving'), gtk.RESPONSE_OK)
dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT)
dialog.add_button(gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT)
@@ -575,8 +577,10 @@
# Enable/disable OpenGL rendering
elif name == 'show_3d':
if value and not chessview.haveGLSupport:
+ # Translators: This is the title of the dialog that is displayed when a user tries to enable 3D without the required libraries
title = _('Unable to enable 3D mode')
errors = '\n'.join(chessview.openGLErrors)
+ # Translators: This is displayed in a dialog when a user tries to enable 3D without the required libraries. %(error)s will be replaced with a list of reasons why 3D is not available.
description = _("""You are unable to play in 3D mode due to the following problems:
%(errors)s
@@ -814,12 +818,18 @@
"""Gtk+ callback"""
if self.view.feedback.claimDraw():
return
+
+ # Translators: This is the title of the dialog that is displayed when a user requests a draw but one is not available
+ title = _("Unable to claim draw")
+ # Translators: This is the message that is displayed in a dialog when a user requests a draw but one is not available
+ message = _("""You may claim a draw when:
+a) The board has been in the same state three times (Three fold repitition)
+b) Fifty moves have occured where no pawn has moved and no piece has been captured (50 move rule)""")
+
dialog = gtk.MessageDialog(flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
type = gtk.MESSAGE_WARNING,
- message_format = _("Unable to claim draw"))
- dialog.format_secondary_text(_("""You may claim a draw when:
-a) The board has been in the same state three times (Three fold repitition)
-b) Fifty moves have occured where no pawn has moved and no piece has been captured (50 move rule)"""))
+ message_format = title)
+ dialog.format_secondary_text(message)
dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_ACCEPT)
dialog.run()
dialog.destroy()
Modified: branches/gnome-2-24/glchess/src/lib/main.py
==============================================================================
--- branches/gnome-2-24/glchess/src/lib/main.py (original)
+++ branches/gnome-2-24/glchess/src/lib/main.py Wed Oct 15 12:37:06 2008
@@ -442,7 +442,9 @@
self.history = history.GameHistory()
- self.logger = self.ui.controller.addLogWindow(_('Application Log'), '', '')
+ # Translators: This is the name of the log that displays application events
+ title = _('Application Log')
+ self.logger = self.ui.controller.addLogWindow(title, '', '')
def addAIProfile(self, profile):
"""Add a new AI profile into glChess.
@@ -687,6 +689,8 @@
self.logger.addLine('loaded in %f seconds' % (time.time() - s))
else:
+ # Translators: This is the text displayed on the command-line if an unknown argument is passed
+ # FIXME: Should be in a dialog
print _('Usage: %s [game]') % sys.argv[0]
sys.exit(0)
@@ -697,8 +701,11 @@
aiName = p.name
break
black = (aiName, 'easy')
- name = _('Human versus %s') % aiName
- g = self.addLocalGame(name, _('White'), None, _('Black'), black)
+ # Translators: This is the name of a human versus AI game. The %s is replaced with the name of the AI player
+ gameName = _('Human versus %s') % aiName
+ whiteName = _('White')
+ blackName = _('Black')
+ g = self.addLocalGame(gameName, whiteName, None, blackName, black)
g.inHistory = True
g.start()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]