# -*- coding: utf-8 -*- #!/usr/bin/python # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007 Johan Gonqvist # Copyright (C) 2007 Gary Burton # Copyright (C) 2007-2009 Stephane Charette # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2008 Jason M. Simanek # Copyright (C) 2008-2011 Rob G. Healey # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id$ """ General constants used in different html enabled plugins """ from gen.ggettext import gettext as _ #------------------------------------------------------------------------ # # GRAMPS modules # #------------------------------------------------------------------------ #------------------------------------------------------------------------ # # Constants # #------------------------------------------------------------------------ _CHARACTER_SETS = [ # First is used as default selection. # As seen on the internet, ISO-xxx are listed as capital letters [_('Unicode UTF-8 (recommended)'), 'UTF-8'], ['ISO-8859-1', 'ISO-8859-1' ], ['ISO-8859-2', 'ISO-8859-2' ], ['ISO-8859-3', 'ISO-8859-3' ], ['ISO-8859-4', 'ISO-8859-4' ], ['ISO-8859-5', 'ISO-8859-5' ], ['ISO-8859-6', 'ISO-8859-6' ], ['ISO-8859-7', 'ISO-8859-7' ], ['ISO-8859-8', 'ISO-8859-8' ], ['ISO-8859-9', 'ISO-8859-9' ], ['ISO-8859-10', 'ISO-8859-10' ], ['ISO-8859-13', 'ISO-8859-13' ], ['ISO-8859-14', 'ISO-8859-14' ], ['ISO-8859-15', 'ISO-8859-15' ], ['koi8_r', 'koi8_r', ], ] _CC = [ '', '' 'Creative Commons License - By attribution', '' 'Creative Commons License - By attribution, No derivations', '' 'Creative Commons License - By attribution, Share-alike', '' 'Creative Commons License - By attribution, Non-commercial', '' 'Creative Commons License - By attribution, Non-commercial, '
    'No derivations', '' 'Creative Commons License - By attribution, Non-commerical, '
    'Share-alike' ] _COPY_OPTIONS = [ _('Standard copyright'), # This must match _CC # translators, long strings, have a look at Web report dialogs _('Creative Commons - By attribution'), _('Creative Commons - By attribution, No derivations'), _('Creative Commons - By attribution, Share-alike'), _('Creative Commons - By attribution, Non-commercial'), _('Creative Commons - By attribution, Non-commercial, No derivations'), _('Creative Commons - By attribution, Non-commercial, Share-alike'), _('No copyright notice'), ] # NarrativeWeb javascript code for PlacePage's "Open Street Map"... openstreet_jsc = """ var marker; var map; OpenLayers.Lang.setCode("%s"); function initialize(){ map = new OpenLayers.Map("map_canvas"); map.addLayer(new OpenLayers.Layer.OSM()); map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData); map.addLayer(map.dataLayer); var centre = new OpenLayers.LonLat(%s, %s); var zoom = 11; map.setCenter(centre, zoom); updateLocation(); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(markers); markers.addMarker(new OpenLayers.Marker(centre)); setMapLayers("M"); map.events.register("moveend", map, updateLocation); map.events.register("changelayer", map, updateLocation); handleResize(); }""" # NarrativeWeb javascript code for PlacePage's "Google Maps"... google_jsc = """ var myLatlng = new google.maps.LatLng(%s, %s); var marker; var map; function initialize() { var mapOptions = { zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, center: myLatlng }; map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); marker = new google.maps.Marker({ map: map, draggable: true, animation: google.maps.Animation.DROP, position: myLatlng }); google.maps.event.addListener(marker, 'click', toggleBounce); } function toggleBounce() { if (marker.getAnimation() != null) { marker.setAnimation(null); } else { marker.setAnimation(google.maps.Animation.BOUNCE); } }"""