# -*- coding: utf-8 -*-
#@+leo-ver=4
#@+node:@file french.py
#@@first

"""Translate a few menu items into French"""

from leoPlugins import *
from leoGlobals import *

#@+others
#@+node:onMenu
#@+at 
#@nonl
# The translation table used by setRealMenuNamesFromTable has entries of the 
# form:
# 
# 	("official name","translated name"),
# 
# Ampersands in the translated name indicate that the following character is 
# to be underlined.
# 
# The official name can be any name equivalent to the standard English menu 
# names.  Leo "canonicalizes" the official name by converting to lower case 
# and removing any non-letters.  Thus, the following are  equivalent:
# 	("Open...","&Ouvre"),
# 	("open",   "&Ouvre"),
# 	("&Open",  "&Ouvre"),
#@-at
#@@c
def onMenu (tag,keywords):
	table = (
		("Open...","&Ouvre"),
		("OpenWith","O&uvre Avec..."),
		("close","&Ferme"),
		("Undo Typing","French &Undo Typing"), # Shows you how much French I know ;-)
		("Redo Typing","French &Redo Typing"),
		("Can't Undo", "French Can't Undo"),
		("Can't Redo", "French Can't Redo"))
	# Call the convenience routine to do the work.
	app().setRealMenuNamesFromTable(table)
#@-node:onMenu
#@-others

if 0: # Register the handlers...
	registerHandler(("start1","menu1"), onMenu)
	
	__version__ = "1.2"
	plugin_signon(__name__)
#@nonl
#@-node:@file french.py
#@-leo
