1# Orca 2# 3# Copyright 2006-2008 Sun Microsystems Inc. 4# 5# This library is free software; you can redistribute it and/or 6# modify it under the terms of the GNU Lesser General Public 7# License as published by the Free Software Foundation; either 8# version 2.1 of the License, or (at your option) any later version. 9# 10# This library is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13# Lesser General Public License for more details. 14# 15# You should have received a copy of the GNU Lesser General Public 16# License along with this library; if not, write to the 17# Free Software Foundation, Inc., Franklin Street, Fifth Floor, 18# Boston MA 02110-1301 USA. 19 20"""Provides getTextAttributeName method that maps each text attribute 21into its localized equivalent.""" 22 23__id__ = "$Id$" 24__version__ = "$Revision$" 25__date__ = "$Date$" 26__copyright__ = "Copyright (c) 2008 Sun Microsystems Inc." 27__license__ = "LGPL" 28 29from .orca_i18n import C_ 30 31# Translators: this is a structure to assist in the generation of 32# localized strings for the various text attributes. 33# 34# Information can be found in the Atk documentation at: 35# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 36# 37# The at-spi IDL documentation for Accessibility_Text.idl also provides 38# the following information: 39# 40# Attributes relevant to localization should be provided in accordance 41# with the w3c "Internationalization and Localization Markup Requirements", 42# http://www.w3.org/TR/2005/WD-itsreq-20051122/ 43# 44# Other text attributes should choose their names and value semantics in 45# accordance with relevant standards such as: 46# CSS level 2 (http://www.w3.org/TR/1998/REC-CSS2-19980512), 47# XHTML 1.0 (http://www.w3.org/TR/2002/REC-xhtml1-20020801), and 48# WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/). 49# 50# Where possible, specific URL references will also be given below for 51# each text attribute. 52# 53 54_textAttributeTable = {} 55 56# Translators: this attribute specifies the background color of the text. 57# The value is an RGB value of the format "u,u,u". 58# See: 59# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 60# 61_textAttributeTable["bg-color"] = C_("textattr", "background color") 62 63# Translators: this attribute specifies whether to make the background 64# color for each character the height of the highest font used on the 65# current line, or the height of the font used for the current character. 66# It will be a "true" or "false" value. 67# See: 68# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 69# 70_textAttributeTable["bg-full-height"] = C_("textattr", "background full height") 71 72# Translators: this attribute specifies whether a GdkBitmap is set for 73# stippling the background color. It will be a "true" or "false" value. 74# See 75# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 76# 77_textAttributeTable["bg-stipple"] = C_("textattr", "background stipple") 78 79# Translators: this attribute specifies the direction of the text. 80# Values are "none", "ltr" or "rtl". 81# See: 82# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 83# 84_textAttributeTable["direction"] = C_("textattr", "direction") 85 86# Translators: this attribute specifies whether the text is editable. 87# It will be a "true" or "false" value. 88# See 89# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 90# 91_textAttributeTable["editable"] = C_("textattr", "editable") 92 93# Translators: this attribute specifies the font family name of the text. 94# See: 95# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 96# 97_textAttributeTable["family-name"] = C_("textattr", "family name") 98 99# Translators: this attribute specifies the foreground color of the text. 100# The value is an RGB value of the format "u,u,u". 101# See: 102# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 103# 104_textAttributeTable["fg-color"] = C_("textattr", "foreground color") 105 106# Translators: this attribute specifies whether a GdkBitmap is set for 107# stippling the foreground color. It will be a "true" or "false" value. 108# See 109# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 110# 111_textAttributeTable["fg-stipple"] = C_("textattr", "foreground stipple") 112 113# Translators: this attribute specifies the effect applied to the font 114# used by the text. 115# See: 116# http://www.w3.org/TR/2002/WD-css3-fonts-20020802/#font-effect 117# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 118# 119_textAttributeTable["font-effect"] = C_("textattr", "font effect") 120 121# Translators: this attribute specifies the indentation of the text 122# (in pixels). 123# See: 124# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 125# 126_textAttributeTable["indent"] = C_("textattr", "indent") 127 128# Translators: this attribute specifies there is something "wrong" with 129# the text, such as it being a misspelled word. See: 130# https://developer.mozilla.org/en/Accessibility/AT-APIs/Gecko/TextAttrs 131# 132_textAttributeTable["invalid"] = C_("textattr", "mistake") 133# Translators: this attribute specifies there is something "wrong" with 134# the text, such as it being a misspelled word. See: 135# https://developer.mozilla.org/en/Accessibility/AT-APIs/Gecko/TextAttrs 136# 137 138# Translators: this attribute specifies whether the text is invisible. 139# It will be a "true" or "false" value. 140# See 141# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 142# 143_textAttributeTable["invisible"] = C_("textattr", "invisible") 144 145# Translators: this attribute specifies how the justification of the text. 146# Values are "left", "right", "center" or "fill". 147# See: 148# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 149# 150_textAttributeTable["justification"] = C_("textattr", "justification") 151 152# Translators: this attribute specifies the language that the text is 153# written in. 154# See: 155# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 156# 157_textAttributeTable["language"] = C_("textattr", "language") 158 159# Translators: this attribute specifies the pixel width of the left margin. 160# See: 161# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 162# 163_textAttributeTable["left-margin"] = C_("textattr", "left margin") 164 165# Translators: this attribute specifies the height of the line of text. 166# See: 167# http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-line-height 168# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 169# 170_textAttributeTable["line-height"] = C_("textattr", "line height") 171 172# Translators: this attribute refers to the named style which is associated 173# with the entire paragraph and which controls the default formatting 174# (font, text size, alignment, etc.) of that paragraph. Examples of 175# paragraph styles include "Heading 1", "Heading 2", "Caption", "Footnote", 176# "Text Body", "Title", and "Subtitle". 177# See: 178# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 179# 180_textAttributeTable["paragraph-style"] = C_("textattr", "paragraph style") 181 182# Translators: this attribute specifies the pixels of blank space to 183# leave above each newline-terminated line. 184# See: 185# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 186# 187_textAttributeTable["pixels-above-lines"] = C_("textattr", "pixels above lines") 188 189# Translators: this attribute specifies the pixels of blank space to 190# leave below each newline-terminated line. 191# See: 192# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 193# 194_textAttributeTable["pixels-below-lines"] = C_("textattr", "pixels below lines") 195 196# Translators: this attribute specifies the pixels of blank space to 197# leave between wrapped lines inside the same newline-terminated line 198# (paragraph). 199# See: 200# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 201# 202_textAttributeTable["pixels-inside-wrap"] = C_("textattr", "pixels inside wrap") 203 204# Translators: this attribute specifies the pixel width of the right margin. 205# See: 206# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 207# 208_textAttributeTable["right-margin"] = C_("textattr", "right margin") 209 210# Translators: this attribute specifies the number of pixels that the 211# text characters are risen above the baseline. 212# See: 213# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 214# 215_textAttributeTable["rise"] = C_("textattr", "rise") 216 217# Translators: this attribute specifies the scale of the characters. The 218# value is a string representation of a double. 219# See: 220# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 221# 222_textAttributeTable["scale"] = C_("textattr", "scale") 223 224# Translators: this attribute specifies the size of the text. 225# See: 226# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 227# 228_textAttributeTable["size"] = C_("textattr", "size") 229 230# Translators: this attribute specifies the stretch of he text, if set. 231# Values are "ultra_condensed", "extra_condensed", "condensed", 232# "semi_condensed", "normal", "semi_expanded", "expanded", 233# "extra_expanded" or "ultra_expanded". 234# See: 235# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 236# 237_textAttributeTable["stretch"] = C_("textattr", "stretch") 238 239# Translators: this attribute specifies whether the text is strike though 240# (in other words, whether there is a line drawn through it). Values are 241# "true" or "false". 242# See: 243# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 244# 245_textAttributeTable["strikethrough"] = C_("textattr", "strike through") 246 247# Translators: this attribute specifies the slant style of the text, 248# if set. Values are "normal", "oblique" or "italic". 249# See: 250# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 251# 252_textAttributeTable["style"] = C_("textattr", "style") 253 254# Translators: this attribute specifies the decoration of the text. 255# See: 256# http://www.w3.org/TR/1998/REC-CSS2-19980512/text.html#propdef-text-decoration 257# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 258# 259_textAttributeTable["text-decoration"] = C_("textattr", "text decoration") 260 261# Translators: this attribute specifies the angle at which the text is 262# displayed (i.e. rotated from the norm) and is represented in degrees 263# of rotation. 264# See: 265# http://www.w3.org/TR/2003/CR-css3-text-20030514/#glyph-orientation-horizontal 266# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 267# 268_textAttributeTable["text-rotation"] = C_("textattr", "text rotation") 269 270# Translators: this attribute specifies the shadow effects applied to the text. 271# See: 272# http://www.w3.org/TR/1998/REC-CSS2-19980512/text.html#propdef-text-shadow 273# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 274# 275_textAttributeTable["text-shadow"] = C_("textattr", "text shadow") 276 277# Translators: this attributes specifies whether the text is underlined. 278# Values are "none", "single", "double" or "low". 279# See: 280# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 281# 282_textAttributeTable["underline"] = C_("textattr", "underline") 283 284# Translators: this attribute specifies the capitalization variant of 285# the text, if set. Values are "normal" or "small_caps". 286# See: 287# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 288# 289_textAttributeTable["variant"] = C_("textattr", "variant") 290 291# Translators: this attributes specifies what vertical alignment property 292# has been applied to the text. 293# See: 294#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 295# 296_textAttributeTable["vertical-align"] = C_("textattr", "vertical align") 297 298# Translators: this attribute specifies the weight of the text. 299# See: 300# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 301# http://www.w3.org/TR/1998/REC-CSS2-19980512/fonts.html#propdef-font-weight 302# 303_textAttributeTable["weight"] = C_("textattr", "weight") 304 305# Translators: this attribute specifies the wrap mode of the text, if any. 306# Values are "none", "char" or "word". 307# See: 308# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 309# 310_textAttributeTable["wrap-mode"] = C_("textattr", "wrap mode") 311 312# Translators: this attribute specifies the way the text is written. 313# Values are "lr-tb", "rl-tb", "tb-rl", "tb-lr", "bt-rl", "bt-lr", "lr", 314# "rl" and "tb". 315# See: 316# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 317# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 318# 319_textAttributeTable["writing-mode"] = C_("textattr", "writing mode") 320 321 322# The following are the known values of some of these text attributes. 323# These values were found in the Atk documentation at: 324# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 325# No doubt there will be more, and as they are found, they can be added 326# to this table so they can be translated. 327# 328 329# Translators: this is one of the text attribute values for the following 330# text attributes: "invisible", "editable", bg-full-height", "strikethrough", 331# "bg-stipple" and "fg-stipple". 332# See: 333# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 334# 335_textAttributeTable["true"] = C_("textattr", "true") 336 337# Translators: this is one of the text attribute values for the following 338# text attributes: "invisible", "editable", bg-full-height", "strikethrough", 339# "bg-stipple" and "fg-stipple". 340# See: 341# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 342# 343_textAttributeTable["false"] = C_("textattr", "false") 344 345# Translators: this is one of the text attribute values for the following 346# text attributes: "font-effect", "underline", "text-shadow", "wrap mode" 347# and "direction". 348# See: 349# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 350# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 351# 352_textAttributeTable["none"] = C_("textattr", "none") 353 354# Translators: this is one of the text attribute values for the following 355# text attributes: "font-effect". 356# See: 357# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 358# 359_textAttributeTable["engrave"] = C_("textattr", "engrave") 360 361# Translators: this is one of the text attribute values for the following 362# text attributes: "font-effect". 363# See: 364# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 365# 366_textAttributeTable["emboss"] = C_("textattr", "emboss") 367 368# Translators: this is one of the text attribute values for the following 369# text attributes: "font-effect". 370# See: 371# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 372# 373_textAttributeTable["outline"] = C_("textattr", "outline") 374 375# Translators: this is one of the text attribute values for the following 376# text attributes: "text-decoration". 377# See: 378# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 379# 380_textAttributeTable["overline"] = C_("textattr", "overline") 381 382# Translators: this is one of the text attribute values for the following 383# text attributes: "text-decoration". 384# See: 385# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 386# 387_textAttributeTable["line-through"] = C_("textattr", "line through") 388 389# Translators: this is one of the text attribute values for the following 390# text attributes: "text-decoration". 391# See: 392# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 393# 394_textAttributeTable["blink"] = C_("textattr", "blink") 395 396# Translators: this is one of the text attribute values for the following 397# text attributes: "text-shadow". 398# See: 399# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 400# 401_textAttributeTable["black"] = C_("textattr", "black") 402 403# Translators: this is one of the text attribute values for the following 404# text attributes: "underline". 405# See: 406# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 407# 408_textAttributeTable["single"] = C_("textattr", "single") 409 410# Translators: this is one of the text attribute values for the following 411# text attributes: "underline". 412# See: 413# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 414# 415_textAttributeTable["double"] = C_("textattr", "double") 416 417# Translators: this is one of the text attribute values for the following 418# text attributes: "underline". 419# See: 420# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 421# 422_textAttributeTable["low"] = C_("textattr", "low") 423 424# Translators: this is one of the text attribute values for the following 425# text attributes: "wrap mode". 426# See: 427# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 428# 429_textAttributeTable["char"] = C_("textattr", "char") 430 431# Translators: this is one of the text attribute values for the following 432# text attributes: "wrap mode". 433# See: 434# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 435# 436_textAttributeTable["word"] = C_("textattr", "word") 437 438# Translators: this is one of the text attribute values for the following 439# text attributes: "wrap mode." It corresponds to GTK_WRAP_WORD_CHAR, 440# defined in the Gtk documentation as "Wrap text, breaking lines in 441# between words, or if that is not enough, also between graphemes." 442# See: 443# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 444# http://library.gnome.org/devel/gtk/stable/GtkTextTag.html#GtkWrapMode 445# 446_textAttributeTable["word_char"] = C_("textattr", "word char") 447 448# Translators: this is one of the text attribute values for the following 449# text attributes: "direction". 450# See: 451# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 452# 453_textAttributeTable["ltr"] = C_("textattr", "ltr") 454 455# Translators: this is one of the text attribute values for the following 456# text attributes: "direction". 457# See: 458# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 459# 460_textAttributeTable["rtl"] = C_("textattr", "rtl") 461 462# Translators: this is one of the text attribute values for the following 463# text attributes: "justification". 464# See: 465# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 466# 467_textAttributeTable["left"] = C_("textattr", "left") 468 469# Translators: this is one of the text attribute values for the following 470# text attributes: "justification". 471# See: 472# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 473# 474_textAttributeTable["right"] = C_("textattr", "right") 475 476# Translators: this is one of the text attribute values for the following 477# text attributes: "justification". 478# See: 479# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 480# 481_textAttributeTable["center"] = C_("textattr", "center") 482 483# Translators: this is one of the text attribute values for the following 484# text attributes: "justification". In Gecko, when no justification has 485# be explicitly set, they report a justification of "start". 486# 487_textAttributeTable["start"] = C_("textattr", "no justification") 488 489# Translators: this is one of the text attribute values for the following 490# text attributes: "justification". 491# See: 492# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 493# 494_textAttributeTable["fill"] = C_("textattr", "fill") 495 496# Translators: this is one of the text attribute values for the following 497# text attributes: "stretch". 498# See: 499# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 500# 501_textAttributeTable["ultra_condensed"] = C_("textattr", "ultra condensed") 502 503# Translators: this is one of the text attribute values for the following 504# text attributes: "stretch". 505# See: 506# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 507# 508_textAttributeTable["extra_condensed"] = C_("textattr", "extra condensed") 509 510# Translators: this is one of the text attribute values for the following 511# text attributes: "stretch". 512# See: 513# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 514# 515_textAttributeTable["condensed"] = C_("textattr", "condensed") 516 517# Translators: this is one of the text attribute values for the following 518# text attributes: "stretch". 519# See: 520# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 521# 522_textAttributeTable["semi_condensed"] = C_("textattr", "semi condensed") 523 524# Translators: this is one of the text attribute values for the following 525# text attributes: "stretch" and "variant". 526# See: 527# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 528# 529_textAttributeTable["normal"] = C_("textattr", "normal") 530 531# Translators: this is one of the text attribute values for the following 532# text attributes: "stretch". 533# See: 534# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 535# 536_textAttributeTable["semi_expanded"] = C_("textattr", "semi expanded") 537 538# Translators: this is one of the text attribute values for the following 539# text attributes: "stretch". 540# See: 541# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 542# 543_textAttributeTable["expanded"] = C_("textattr", "expanded") 544 545# Translators: this is one of the text attribute values for the following 546# text attributes: "stretch". 547# See: 548# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 549# 550_textAttributeTable["extra_expanded"] = C_("textattr", "extra expanded") 551 552# Translators: this is one of the text attribute values for the following 553# text attributes: "stretch". 554# See: 555# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 556# 557_textAttributeTable["ultra_expanded"] = C_("textattr", "ultra expanded") 558 559# Translators: this is one of the text attribute values for the following 560# text attributes: "variant". 561# See: 562# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 563# 564_textAttributeTable["small_caps"] = C_("textattr", "small caps") 565 566# Translators: this is one of the text attribute values for the following 567# text attributes: "style". 568# See: 569# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 570# 571_textAttributeTable["oblique"] = C_("textattr", "oblique") 572 573# Translators: this is one of the text attribute values for the following 574# text attributes: "style". 575# See: 576# http://developer.gnome.org/atk/stable/AtkText.html#AtkTextAttribute 577# 578_textAttributeTable["italic"] = C_("textattr", "italic") 579 580# Translators: this is one of the text attribute values for the following 581# text attributes: "paragraph-style". 582# See: 583# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 584# 585_textAttributeTable["Default"] = C_("textattr", "Default") 586 587# Translators: this is one of the text attribute values for the following 588# text attributes: "paragraph-style". 589# See: 590# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 591# 592_textAttributeTable["Text body"] = C_("textattr", "Text body") 593 594# Translators: this is one of the text attribute values for the following 595# text attributes: "paragraph-style". 596# See: 597# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 598# 599_textAttributeTable["Heading"] = C_("textattr", "Heading") 600 601# Translators: this is one of the text attribute values for the following 602# text attributes: "vertical-align". 603# See: 604#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 605# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 606# 607_textAttributeTable["baseline"] = C_("textattr", "baseline") 608 609# Translators: this is one of the text attribute values for the following 610# text attributes: "vertical-align". 611# See: 612#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 613# 614_textAttributeTable["sub"] = C_("textattr", "sub") 615 616# Translators: this is one of the text attribute values for the following 617# text attributes: "vertical-align". 618# See: 619#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 620# 621_textAttributeTable["super"] = C_("textattr", "super") 622 623# Translators: this is one of the text attribute values for the following 624# text attributes: "vertical-align". 625# See: 626#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 627# 628_textAttributeTable["top"] = C_("textattr", "top") 629 630# Translators: this is one of the text attribute values for the following 631# text attributes: "vertical-align". 632# See: 633#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 634# 635_textAttributeTable["text-top"] = C_("textattr", "text-top") 636 637# Translators: this is one of the text attribute values for the following 638# text attributes: "vertical-align". 639# See: 640#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 641# 642_textAttributeTable["middle"] = C_("textattr", "middle") 643 644# Translators: this is one of the text attribute values for the following 645# text attributes: "vertical-align". 646# See: 647#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 648# 649_textAttributeTable["bottom"] = C_("textattr", "bottom") 650 651# Translators: this is one of the text attribute values for the following 652# text attributes: "vertical-align". 653# See: 654#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 655# 656_textAttributeTable["text-bottom"] = C_("textattr", "text-bottom") 657 658# Translators: this is one of the text attribute values for the following 659# text attributes: "vertical-align" and "writing-mode". 660# See: 661#http://www.w3.org/TR/1998/REC-CSS2-19980512/visudet.html#propdef-vertical-align 662# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 663# 664_textAttributeTable["inherit"] = C_("textattr", "inherit") 665 666# Translators: this is one of the text attribute values for the following 667# text attributes: "writing-mode". 668# See: 669# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 670# 671_textAttributeTable["lr-tb"] = C_("textattr", "lr-tb") 672 673# Translators: this is one of the text attribute values for the following 674# text attributes: "writing-mode". 675# See: 676# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 677# 678_textAttributeTable["rl-tb"] = C_("textattr", "rl-tb") 679 680# Translators: this is one of the text attribute values for the following 681# text attributes: "writing-mode". 682# See: 683# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 684# 685_textAttributeTable["tb-rl"] = C_("textattr", "tb-rl") 686 687# Translators: this is one of the text attribute values for the following 688# text attributes: "writing-mode". 689# See: 690# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 691# 692_textAttributeTable["tb-lr"] = C_("textattr", "tb-lr") 693 694# Translators: this is one of the text attribute values for the following 695# text attributes: "writing-mode". 696# See: 697# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 698# 699_textAttributeTable["bt-rl"] = C_("textattr", "bt-rl") 700 701# Translators: this is one of the text attribute values for the following 702# text attributes: "writing-mode". 703# See: 704# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 705# 706_textAttributeTable["bt-lr"] = C_("textattr", "bt-lr") 707 708# Translators: this is one of the text attribute values for the following 709# text attributes: "writing-mode". 710# See: 711# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 712# 713_textAttributeTable["lr"] = C_("textattr", "lr") 714 715# Translators: this is one of the text attribute values for the following 716# text attributes: "writing-mode". 717# See: 718# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 719# 720_textAttributeTable["rl"] = C_("textattr", "rl") 721 722# Translators: this is one of the text attribute values for the following 723# text attributes: "writing-mode". 724# See: 725# http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection 726# 727_textAttributeTable["tb"] = C_("textattr", "tb") 728 729# Translators: this is one of the text attribute values for the following 730# text attributes: "strikethrough." It refers to the line style. 731# 732_textAttributeTable["solid"] = C_("textattr", "solid") 733 734# Translators: this is one of the text attribute values for the following 735# text attributes: "invalid". It is an indication that the text is not 736# spelled correctly. See: 737# https://developer.mozilla.org/en/Accessibility/AT-APIs/Gecko/TextAttrs 738# 739_textAttributeTable["spelling"] = C_("textattr", "spelling") 740 741# Translators: This is the text-spelling attribute. See: 742# http://wiki.services.openoffice.org/wiki/Accessibility/TextAttributes 743# 744_textAttributeTable["text-spelling"] = C_("textattr", "spelling") 745 746def getTextAttributeKey(localizedTextAttr): 747 """Given a localized text attribute, return the original text 748 attribute, (i.e. the key value). 749 750 Arguments: 751 - localizedTextAttr: the localized text attribute. 752 753 Returns a string representing the original text attribute key for the 754 localized text attribute. 755 """ 756 757 for key, value in _textAttributeTable.items(): 758 if value == localizedTextAttr: 759 return key 760 761 return localizedTextAttr 762 763def getTextAttributeName(textAttr, script=None): 764 """Given a text attribute, returns its localized equivalent. 765 766 Arguments: 767 - textAttr: the text attribute to get the localized equivalent of. 768 769 Returns a string representing the localized equivalent for the text 770 attribute. 771 """ 772 773 # Normalize the name to an Atk name before attempting to look it up. 774 # 775 if script: 776 textAttr = script.utilities.getAtkNameForAttribute(textAttr) 777 778 return _textAttributeTable.get(textAttr, textAttr) 779