Localization/Library: Difference between revisions

From OLPC
Jump to navigation Jump to search
(→‎Books: templated the (en) strings)
(added biology dtd as part of xml discussion)
Line 285: Line 285:


<pre>
<pre>
<!-- NOT VALIDATED! -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE article SYSTEM "biology.dtd">


<article id="1"> <!-- sample -->
<article id="1"> <!-- sample -->
<title lang="default">Sample title</title>
<title language="default">Sample title</title>
<author lang="default">Made-up author name</author>
<author language="default">Made-up author name</author>
<publisher lang="default">Fictional publisher</publisher>
<publisher language="default">Fictional publisher</publisher>
<date lang="default">2007</date>
<date language="default">2007</date>
<note lang="default">No language specified, or no translation exists in this language</note>
<note language="default">No language specified, or no translation exists in this language</note>
<note lang="en">A note in English</note>
<note language="en">A note in English</note>
<note lang="es">A note in Espanol</note>
<note language="es">A note in Espanol</note>
<note lang="pt">A note in Portuguese<note>
<note language="pt">A note in Portuguese<note>
</article>
</article>


<article id="2">
<article id="2">
<title lang="default">Tundra</title>
<title language="default">Tundra</title>
<author lang="default"> Frans Lanting </author>
<author language="default"> Frans Lanting </author>
<publisher lang="default">E.O. Wilson Foundation</publisher>
<publisher language="default">E.O. Wilson Foundation</publisher>
<date lang="default">2007</date>
<date language="default">2007</date>
<note lang="default"> Fall colors, Wrangell-St. Elias National Park, Alaska, USA </note>
<note language="default"> Fall colors, Wrangell-St. Elias National Park, Alaska, USA </note>
<note lang="en">Fall colors, Wrangell-St. Elias National Park, Alaska, USA</note>
<note language="en">Fall colors, Wrangell-St. Elias National Park, Alaska, USA</note>
<note lang="es">Colores otoñales, Parque Nacional de Wrangell-St. Elias, Alaska, EE.UU.</note>
<note language="es">Colores otoñales, Parque Nacional de Wrangell-St. Elias, Alaska, EE.UU.</note>
<note lang="pt">Cores outonales, Parque nacional Wrangell-St. Elias, Alaska, EUA<note>
<note language="pt">Cores outonales, Parque nacional Wrangell-St. Elias, Alaska, EUA<note>
</article>
</article>
</pre>


The advantage to XML is that we can use DTDs to make sure the input format is nice and correct.

<pre>
<!-- NOT VALIDATED -->

<!--
Doctype for OLPC biology library format - intended to be template for future article formats as well.
mchua 3/29/07 - created

The below notes are largely for content contributors who haven't seen DTDs before:
* a library consists of articles with unique IDs
* articles without assigned ID#s get an ID of 0
* title and author are required
* Tags can be marked with language attributes so you can specify what language you're writing in.
check to make sure the value for language you're putting in is valid, or the parser
won't recognize it!
* if no language attribute is specified for child tags, they get a value of "default"
(and will show up when users don't specify a language they want to view in,
or if the language they request does not have a translation yet.)
-->

<!DOCTYPE BIOLOGY [

<!ELEMENT article (title+, author+, publisher*, date*, note*)>
<!ATTLIST article id CDATA "0"> <!-- I would use ID instead of CDATA but ID can't have a default value -->

<!ELEMENT title (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT author (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT publisher (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT date (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT note (#PCDATA)>
<!ATTLIST title language CDATA "default">

]>

<!-- Possible easy way for people to denote licensing for their work?
<!ENTITY license-by-sa "Creative Commons Attribution Share-Alike">
-->
</pre>
</pre>



Revision as of 18:02, 29 March 2007

Navigation Index

Navigation sidebar

sidebar table:

OLPC Library Biblioteca OLPC Biblioteca de OLPC
books & reference libros & referencia livros & referência
picture books libros para chicos livros das crianças
reference enciclopedia enciclopédia
stories clásicos literarios clássicos literários
lessons lecciones lições
math & science matemáticas & ciencias matemática & ciência
biology biología biologia
math & logic matemáticas & lógica matemática & lógica
images & maps imágenes & mapas imagens & mapas
nature naturaleza natureza
atlas atlas & mapas atlas & mapas
historical históricos históricos
music & video música & video música & vídeo
media audio-libros livros audio
activities & games actividades & juegos atividades & jogos
games juegos jogos
web enlaces red ligações rede
search the web buscar en la red procurarar a rede
web links sitios para chicos ligações para crianças
uniwiki uniwiki uniwiki
water & environment agua & medioambiente água & ambiente

PO format:

msgid ""
#en msgstr "OLPC Library"
#es msgstr "Biblioteca OLPC"
#pt msgstr "Biblioteca de OLPC"

msgid ""
#en msgstr "books & reference"
#es msgstr "libros & referencia"
#pt msgstr "livros & referência"

msgid ""
#en msgstr "children's books"
#es msgstr "libros para chicos"
#pt msgstr "livros das crianças"

msgid ""
#en msgstr "encyclopedia"
#es msgstr "enciclopedia"
#pt msgstr "enciclopédia"

msgid ""
#en msgstr "literary classics"
#es msgstr "clásicos literarios"
#pt msgstr "clássicos literários"

msgid ""
#en msgstr "lessons"
#es msgstr "lecciones"
#pt msgstr "lições"

msgid ""
#en msgstr "math & science"
#es msgstr "matemáticas & ciencias"
#pt msgstr "matemática & ciência"

msgid ""
#en msgstr "biology"
#es msgstr "biología"
#pt msgstr "biologia"

msgid ""
#en msgstr "math & logic"
#es msgstr "matemáticas & lógica"
#pt msgstr "matemática & lógica"

msgid ""
#en msgstr "images & maps"
#es msgstr "imágenes & mapas"
#pt msgstr "imagens & mapas"

msgid ""
#en msgstr "nature"
#es msgstr "naturaleza"
#pt msgstr "natureza"

msgid ""
#en msgstr "atlas & maps"
#es msgstr "atlas & mapas"
#pt msgstr "atlas & mapas"

msgid ""
#en msgstr "historical"
#es msgstr "históricos"
#pt msgstr "históricos"

msgid ""
#en msgstr "music & video"
#es msgstr "música & video"
#pt msgstr "música & vídeo"

msgid ""
#en msgstr "audiobooks"
#es msgstr "audio-libros"
#pt msgstr "livros audio"

msgid ""
#en msgstr "activities & games"
#es msgstr "actividades & juegos"
#pt msgstr "atividades & jogos"

msgid ""
#en msgstr "games"
#es msgstr "juegos"
#pt msgstr "jogos"

msgid ""
#en msgstr "web links"
#es msgstr "enlaces red"
#pt msgstr "ligações rede"

msgid ""
#en msgstr "search the web"
#es msgstr "buscar en la red"
#pt msgstr "procurarar a rede"

msgid ""
#en msgstr "links for kids"
#es msgstr "sitios para chicos"
#pt msgstr "ligações para crianças"

msgid ""
#en msgstr "uniwiki"
#es msgstr "uniwiki"
#pt msgstr "uniwiki"

msgid ""
#en msgstr "water & environment"
#es msgstr "agua & medioambiente"
#pt msgstr "água & ambiente"

Math & Science

biology

NOTICE: the 'translation' to portuguese is actually an improvisation over Google's service!

IT NEEDS A SERIOUS REVIEWER.
The spanish translation should also be reviewed by somebody knowledgeable in biology (or rather botany and biomes)

Biology table:

math & science matemáticas & ciencias matemática & ciência
biology biología biologia
Tundra Tundra Tundra
Fall colors, Wrangell-St. Elias National Park, Alaska, USA Colores otoñales, Parque Nacional de Wrangell-St. Elias, Alaska, EE.UU. Cores outonales, Parque nacional Wrangell-St. Elias, Alaska, EUA
Boreal Forests / Tiaga Bosques boreales / Tiaga Florestas Boreales / Tiaga
Lakes and muskegs, Chitina River Valley, Wrangell St. Elias National Park, Alaska, USA Lagos y muskegs, Chitina River Valley, Parque Nacional Wrangell St. Elias, Alaska, EE.UU. Lagos e muskegs, Chitina River Valley, Parque Nacional do Wrangell St. Elias, Alaska, EUA
Temperate coniferous forests Bosques coníferos templados Florestas coníferas temperadas
Aspen and conifers, Dixie National Forest, Utah, USA Alamos y coníferas, Bosque Nacional de Dixie, Utah, EE.UU. Choupo tremedor e coníferas, Floresta Nacional de Dixie, Utá, EUA
Temperate broadleaf mixed forests Bosques de flor templados mezclados Florestas misturadas com flor temperados
Flowering rata tree, Metrosideros umbellata, Westland National Park, New Zealand Árbol rata floreciendo, Metrosideros umbellata, Parque Nacional Westland, Nueva Zelandia Árvore do rata, Metrosideros umbellata, Parque Nacional Westland, Nova Zelândia
Temperate grasslands, savannas, and shrublands Praderas, savannas, y montes templados Pradarias, y savanas temperedas
Coastal prairie in mist, Monterey Bay, California, USA Pradera costera en la niebla, Bahía de Monterey, California, EE.UU. Pradaria litoral na névoa, Baía de Monterey, Califórnia, EUA
Montane grasslands and shrublands Praderas y arbustos de altura Prados e plantas do altura
Nilgiri Hills, Western Ghats, India Colinas de Nilgiri, Ghats occidental, India Montes de Nilgiri, Ghats ocidental, India
Deserts and xeric shrublands Desiertos y vegetación xérica Desertos e plantas xericas
River gum trees and spinifex grass, Central Desert, Australia Árboles de goma de río y pasto spinifex, Desierto Central, Australia Árvores do goma do rio e grama do spinifex, Deserto Central, Austrália
Mediterranean forests, woodlands, and scrub Bosques mediterráneos, arboledas, y arbustos Florestas Mediterranean, e arbustos
Flowering namaqua daisies, Namaqualand, Goegap Nature Reserve, South Africa Margaritas namaqua floreciendo, Namaqualand, Reserva Natural de Goegap, Sudáfrica Margaridinhas namaqua, Namaqualand, Reserva de natureza de Goegap, África do Sul
Tropical and subtropical grasslands, savannas, and shrublands Prados, sabanas, y montes tropicales y subtropicales Pradaria, savanas, e monte tropicais e subtropical
Giraffe (Giraffa camelopardalis) and zebras (Equus quagga) foraging, Masai Mara Reserve, Kenya Jirafa (Giraffa camelopardalis) y cebras (Equus quagga) alimentándose, Reserva Mara de los Masai, Kenia Girafa (Giraffa camelopardalis) e zebras (Equus quagga) comendo, Reserva Mara dos Masai, Kenya
Flooded grasslands and savannas Praderas inundadas y sabanas Pradaria inundadas e savanas
Palm islands, Okavango Delta, Botswana Islas de palmas, Delta de Okavango, Botswana Ilha da palma, Delta de Okavango, Botswana
Tropical and subtropical moist broadleaf forests Bosques de flores húmedas tropicales y subtropicales Florestas da folha húmidas tropicais e subtropical
Ranomafana rainforest, Madagascar Selva de Ranomafana, Madagascar Selva de Ranomafana, Madagascar
Tropical and subtropical dry broadleaf forests Bosques secos de flor tropicales y subtropicales Florestas secas com flor tropicais e subtropical
Cerrado woodland, Pantanal, Brazil Arbolado de Cerrado, Pantanal, Brasil Floresta de Cerrado, Pantanal, Brasil
Tropical and subtropical coniferous forests Bosque de coníferas tropical y subtropical Florestas coniferous tropicais e subtropical
Firs and pines, Sierra Madre Oriental, Michoacan, Mexico Abetos y pinos, Sierra Madre Oriental, Michoacan, México Abetos e pinhos, Sierra Madre Oriental, Michoacan, México

Biology PO strings

msgid "tundra-title"
#en msgstr "Tundra"
#es msgstr "Tundra"
#pt msgstr "Tundra"

msgid "tundra-note"
#en msgstr "Fall colors, Wrangell-St. Elias National Park, Alaska, USA"
#es msgstr "Colores otoñales, Parque Nacional de Wrangell-St. Elias, Alaska, EE.UU."
#pt msgstr "Cores outonales, Parque nacional Wrangell-St. Elias, Alaska, EUA"

msgid "tiaga-title"
#en msgstr "Boreal Forests / Tiaga"
#es msgstr "Bosques boreales / Tiaga"
#pt msgstr "Florestas Boreal / Tiaga"

msgid "tiaga-note"
#en msgstr "Lakes and muskegs, Chitina River Valley, Wrangell St. Elias National Park, Alaska, USA"
#es msgstr "Lagos y muskegs, Chitina River Valley, Parque Nacional Wrangell St. Elias, Alaska, EE.UU."
#pt msgstr "Lagos e muskegs, Chitina River Valley, Parque Nacional do Wrangell St. Elias, Alaska, EUA"

msgid "temperate-coniferous-title"
#en msgstr "Temperate coniferous forests"
#es msgstr "Bosques coníferos templados"
#pt msgstr "Florestas coníferas temperadas"

msgid "temperate-coniferous-note"
#en msgstr "Aspen and conifers, Dixie National Forest, Utah, USA"
#es msgstr "Alamos y coníferas, Bosque Nacional de Dixie, Utah, EE.UU."
#pt msgstr "Choupo tremedor e coníferas, Floresta Nacional de Dixie, Utá, EUA"

msgid "temperate-broadleaf-title"
#en msgstr "Temperate broadleaf mixed forests"
#es msgstr "Bosques de flor templados mezclados"
#pt msgstr "Florestas misturadas com flor temperados"

msgid "temperate-broadleaf-note"
#en msgstr "Flowering rata tree, Metrosideros umbellata, Westland National Park, New Zealand"
#es msgstr "Árbol rata floreciendo, Metrosideros umbellata, Parque Nacional Westland, Nueva Zelandia"
#pt msgstr "Árvore do rata, Metrosideros umbellata, Parque Nacional Westland, Nova Zelândia"

msgid "prairie-title"
#en msgstr "Temperate grasslands, savannas, and shrublands"
#es msgstr "Praderas, savannas, y montes templados"
#pt msgstr "Pradarias, y savanas temperedas"

msgid "prairie-note"
#en msgstr "Coastal prairie in mist, Monterey Bay, California, USA"
#es msgstr "Pradera costera en la niebla, Bahía de Monterey, California, EE.UU."
#pt msgstr "Pradaria litoral na névoa, Baía de Monterey, Califórnia, EUA"

msgid "montane-title"
#en msgstr "Montane grasslands and shrublands"
#es msgstr "Praderas y arbustos de altura"
#pt msgstr "Prados e plantas do altura"

msgid "montane-note"
#en msgstr "Nilgiri Hills, Western Ghats, India"
#es msgstr "Colinas de Nilgiri, Ghats occidental, India"
#pt msgstr "Montes de Nilgiri, Ghats ocidental, India"

msgid "desert-title"
#en msgstr "Deserts and xeric shrublands"
#es msgstr "Desiertos y vegetación xérica"
#pt msgstr "Desertos e plantas xericas"

msgid "desert-note"
#en msgstr "River gum trees and spinifex grass, Central Desert, Australia"
#es msgstr "Árboles de goma de río y pasto spinifex, Desierto Central, Australia"
#pt msgstr "Árvores do goma do rio e grama do spinifex, Deserto Central, Austrália"

msgid "mediterranean-title"
#en msgstr "Mediterranean forests, woodlands, and scrub"
#es msgstr "Bosques mediterráneos, arboledas, y arbustos"
#pt msgstr "Florestas Mediterranean, e arbustos"

msgid "mediterranean-note"
#en msgstr "Flowering namaqua daisies, Namaqualand, Goegap Nature Reserve, South Africa"
#es msgstr "Margaritas namaqua floreciendo, Namaqualand, Reserva Natural de Goegap, Sudáfrica"
#pt msgstr "Margaridinhas namaqua, Namaqualand, Reserva de natureza de Goegap, África do Sul"

msgid "savannah-title"
#en msgstr "Tropical and subtropical grasslands, savannas, and shrublands"
#es msgstr "Prados, sabanas, y montes tropicales y subtropicales"
#pt msgstr "Pradaria, savanas, e monte tropicais e subtropical"

msgid "savannah-note"
#en msgstr "Giraffe (Giraffa camelopardalis) and zebras (Equus quagga) foraging, Masai Mara Reserve, Kenya"
#es msgstr "Jirafa (Giraffa camelopardalis) y cebras (Equus quagga) alimentándose, Reserva Mara de los Masai, Kenia"
#pt msgstr "Girafa (Giraffa camelopardalis) e zebras (Equus quagga) comendo, Reserva Mara dos Masai, Kenya"

msgid "floodplain-title"
#en msgstr "Flooded grasslands and savannas"
#es msgstr "Praderas inundadas y sabanas"
#pt msgstr "Pradaria inundadas e savanas"

msgid "floodplain-note"
#en msgstr "Palm islands, Okavango Delta, Botswana"
#es msgstr "Islas de palmas, Delta de Okavango, Botswana"
#pt msgstr "Ilha da palma, Delta de Okavango, Botswana"

msgid "tropical-moist-title"
#en msgstr "Tropical and subtropical moist broadleaf forests"
#es msgstr "Bosques de flor húmedas tropicales y subtropicales"
#pt msgstr "Florestas da folha húmidas tropicais e subtropical"

msgid "tropical-moist-note"
#en msgstr "Ranomafana rainforest, Madagascar"
#es msgstr "Selva de Ranomafana, Madagascar"
#pt msgstr "Selva de Ranomafana, Madagascar"

msgid "tropical-dry-title"
#en msgstr "Tropical and subtropical dry broadleaf forests"
#es msgstr "Bosques secos de flor tropicales y subtropicales"
#pt msgstr "Florestas da secas com flor tropicais e subtropical"

msgid "tropical-dry-note"
#en msgstr "Cerrado woodland, Pantanal, Brazil"
#es msgstr "Arbolado de Cerrado, Pantanal, Brasil"
#pt msgstr "Floresta de Cerrado, Pantanal, Brasil"

msgid "tropical-coniferous-title"
#en msgstr "Tropical and subtropical coniferous forests"
#es msgstr "Bosque de coníferas tropical y subtropical"
#pt msgstr "Florestas coniferous tropicais e subtropical"

msgid "tropical-coniferous-note"
#en msgstr "Firs and pines, Sierra Madre Oriental, Michoacan, Mexico"
#es msgstr "Abetos y pinos, Sierra Madre Oriental, Michoacan, México"
#pt msgstr "Abetos e pinhos, Sierra Madre Oriental, Michoacan, México"

Biology XML format

Experimental - possible future format for scalability. This XML could be submitted/edited directly by content contributors and automagically parsed into HTML. Note that every article has its own unique ID, and that each child tag within an article has a "lang" attribute to enable people to put in translations. The unique ID being wiki-editable is potentially dangerous - easy to change book IDs, duplicate ID numbers, etc. which is probably an argument in favor for a CMS (much as I hate to say it); this format would be easily transferable to a CMS.

Right now I'm just parsing the title, author, publisher date, and note tags, but more can be added if needed. There needs to be an instance of each tag with the lang attribute set to "default" (for when no language is specified, or a nonexistent translation is requested). Tags with no lang attribute are taken to be set as "default." The last valid version of each tag/lang combination is what is actually parsed. For instance:

<title> A title! </title>
<author lang="en">Author1</author>
<author lang="en">Overwrite Author1</author>

is the same as

<title lang="default"> A title! </title>
<author lang="en">Overwrite Author1</author>

Actual sample xml follows. Mchua 11:03, 29 March 2007 (EDT)

<!-- NOT VALIDATED! -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE article SYSTEM "biology.dtd">

<article id="1"> <!-- sample -->
    <title language="default">Sample title</title>
    <author language="default">Made-up author name</author>
    <publisher language="default">Fictional publisher</publisher>
    <date language="default">2007</date>
    <note language="default">No language specified, or no translation exists in this language</note>
    <note language="en">A note in English</note>
    <note language="es">A note in Espanol</note>
    <note language="pt">A note in Portuguese<note>
</article>

<article id="2">
    <title language="default">Tundra</title>
    <author language="default"> Frans Lanting </author>
    <publisher language="default">E.O. Wilson Foundation</publisher>
    <date language="default">2007</date>
    <note language="default"> Fall colors, Wrangell-St. Elias National Park, Alaska, USA </note>
    <note language="en">Fall colors, Wrangell-St. Elias National Park, Alaska, USA</note>
    <note language="es">Colores otoñales, Parque Nacional de Wrangell-St. Elias, Alaska, EE.UU.</note>
    <note language="pt">Cores outonales, Parque nacional Wrangell-St. Elias, Alaska, EUA<note>
</article>

The advantage to XML is that we can use DTDs to make sure the input format is nice and correct.

<!-- NOT VALIDATED -->

<!--
Doctype for OLPC biology library format - intended to be template for future article formats as well.
mchua 3/29/07 - created

The below notes are largely for content contributors who haven't seen DTDs before:
 * a library consists of articles with unique IDs
 * articles without assigned ID#s get an ID of 0
 * title and author are required
 * Tags can be marked with language attributes so you can specify what language you're writing in.
   check to make sure the value for language you're putting in is valid, or the parser
   won't recognize it!
 * if no language attribute is specified for child tags, they get a value of "default"
   (and will show up when users don't specify a language they want to view in,
    or if the language they request does not have a translation yet.)
-->

<!DOCTYPE BIOLOGY [

<!ELEMENT article (title+, author+, publisher*, date*, note*)>
<!ATTLIST article id CDATA "0"> <!-- I would use ID instead of CDATA but ID can't have a default value -->

<!ELEMENT title (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT author (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT publisher (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT date (#PCDATA)>
<!ATTLIST title language CDATA "default">

<!ELEMENT note (#PCDATA)>
<!ATTLIST title language CDATA "default">

]>

<!-- Possible easy way for people to denote licensing for their work?
<!ENTITY license-by-sa "Creative Commons Attribution Share-Alike">
-->

Alternative XML markup

Grouped by language - possibly easier for content contributors & translators, but (I perceive it to be) less flexible in terms of adding tags, languages, etc. on the parse-to-xhtml end. Mchua 11:22, 29 March 2007 (EDT)

<article id="1">
    <default>
        <title> Default title </title>
        <author> Default author </author>
    </default>
    <en>
        <title> English title </title>
        <author> English author </author>
    <en>
    <es>
        <title> Espanol title </title>
        <author> Espanol author </author>
    <es>
</article>


Books

#
#  Book: Address
#

msgid "libro-address-numero"
#en msgstr "1"

msgid "libro-address-titulo"
#en msgstr "Address"

msgid "libro-address-autor1"
#en msgstr "Authors - Ahmad Reza Ahmadi"

msgid "libro-address-autor2"
#en msgstr  "Illustrators - Sharareh Khosravani"

msgid "libro-address-comentario1"
#en msgstr "Grandma was sick and coughed all the time so her grandson went to the store to get more medicine. Finding the store was harder than he thought since he couldn't understand the people he showed the ad..."

msgid "libro-address-idioma"
#en msgstr	"Persian / Farsi"

msgid "libro-address-fecha"
#en msgstr "1384 (Iranian Calendar)"

#
#  Book: Asleep and awake
#

msgid "libro-asleep-numero"
#en msgstr "2"

msgid "libro-asleep-titulo"
#en msgstr "Asleep and awake"

msgid "libro-asleep-autor1"
#en msgstr "Authors and Illustrators - Azita Arta"

msgid "libro-asleep-comentario1"
#en msgstr "A stranger told Mahan, a merchant, he had profited from a trade and asked him to follow him. He followed the stranger into the desert but the stranger disappeared. Then, another man and woman promised..."

msgid "libro-asleep-comentario2"
#en msgstr "Awards - Selected title of the Bratislava Biennial of lllustrations-Selected title of the Bologna Illustrators Exhibition-BolognaRagazzi Award -- New Horizons (awarded to the series)"

msgid "libro-asleep-idioma"
#en msgstr "Persian / Farsi"

msgid "libro-asleep-fecha"
#en msgstr "2000"

#
#  Book: Aunt, dear Aunt, kind Daddy
#

msgid "libro-dearaunt-numero"
#en msgstr "3"

msgid "libro-dearaunt-titulo"
#en msgstr "Aunt, dear Aunt, kind Daddy"

msgid "libro-dearaunt-autor1"
#en msgstr "Authors - Mostafa Rahmandoust"

msgid "libro-dearaunt-autor2"
#en msgstr "Illustrators - Ali Namvar"

msgid "libro-dearaunt-comentario1"
#en msgstr "A girl leaves home to escape her arranged marriage."

msgid "libro-dearaunt-idioma"
#en msgstr "Persian / Farsi"

msgid "libro-dearaunt-fecha"
#en msgstr "1381 (Iranian Calendar)"

#
#  Book: The blue sky
#

msgid "libro-bluesky-numero"
#en msgstr "4"

msgid "libro-bluesky-titulo"
#en msgstr "The blue sky"

msgid "libro-bluesky-autor1"
#en msgstr "Authors and Illustrators - Andrea Petrlik Huseinović"

msgid "libro-bluesky-autor2"
#en msgstr "Translators - Ludwig Bauer"

msgid "libro-bluesky-comentario1"
#en msgstr "A sad and lonely little girl dreams of seeing her mother again as she watches the clouds in the sky. One day, she meets a strange bird who helps the girl return to her mother."

msgid "libro-bluesky-comentario2"
#en msgstr "Awards - Grigor Vitez Award-BIB (Biennial of Illustration), Bratislava, Gold Plaque"

msgid "libro-bluesky-idioma"
#en msgstr "English"

msgid "libro-bluesky-fecha"
#en msgstr "2001"

#
#  Book: The Captain
#

msgid "libro-captain-numero"
#en msgstr "5"

msgid "libro-captain-titulo"
#en msgstr "The Captain"

msgid "libro-captain-autor1"
#en msgstr "Authors - Liliana Santirso"

msgid "libro-captain-autor2"
#en msgstr "Illustrators - Patricio Gómez"

msgid "libro-captain-comentario1"
#en msgstr "The Captain was just a boy when he set foot on a ship called the Sebastian. He spent many years on the ship and with it shared many adventures. But, can he lead his crew through the toughest waters o..."

msgid "libro-captain-idioma"
#en msgstr "Spanish"

msgid "libro-captain-fecha"
#en msgstr "1998"

#
#  Book: Ciconia Ciconia
#

msgid "libro-ciconia-numero"
#en msgstr "6"

msgid "libro-ciconia-titulo"
#en msgstr "Ciconia Ciconia"

msgid "libro-ciconia-autor1"
#en msgstr "Authors and Illustrators - Andrea Petrlik Huseinović"

msgid "libro-ciconia-comentario1"
#en msgstr "When the white stork's Croatian village is destroyed by war, he searches for a new place to live. However, he finds out that there's no place like home."

msgid "libro-ciconia-comentario2"
#en msgstr "Awards - Grand Prize, Oita Biennial of Illustrations-Selected title of the White Ravens"

msgid "libro-ciconia-idioma"
#en msgstr "Croatian"

msgid "libro-ciconia-fecha"
#en msgstr "2003"

#
#  Book: I like to play with books
#

msgid "libro-playwithbooks-numero"
#en msgstr "7"

msgid "libro-playwithbooks-titulo"
#en msgstr "I like to play with books"

msgid "libro-playwithbooks-autor1"
#en msgstr "Authors - Liliana Santirso"

msgid "libro-playwithbooks-autor2"
#en msgstr "Illustrators - Raúl Villagómez~Patricio Gómez"

msgid "libro-playwithbooks-comentario1"
#en msgstr "This is a short story about why a child loves to play with books."

msgid "libro-playwithbooks-comentario2"
#en msgstr ""

msgid "libro-playwithbooks-idioma"
#en msgstr "Spanish"

msgid "libro-playwithbooks-fecha"
#en msgstr "1998"

#
#  Book: Little Fluff and his brothers
#

msgid "libro-fluff-numero"
#en msgstr "8"

msgid "libro-fluff-titulo"
#en msgstr "Little Fluff and his brothers"

msgid "libro-fluff-autor1"
#en msgstr "Authors - Daniel Barradas"

msgid "libro-fluff-autor2"
#en msgstr "Illustrators - Carla Pott"

msgid "libro-fluff-comentario1"
#en msgstr "This is the story of a little pink fluff that was born in the navel of a girl. Unlike the others, that turned grey with time, this little fluff never lost its color. He felt lonely because he was di..."

msgid "libro-fluff-comentario2"
#en msgstr ""

msgid "libro-fluff-idioma"
#en msgstr "Portuguese"

msgid "libro-fluff-fecha"
#en msgstr ""

#
#  Book: The red ball
#

msgid "libro-redball-numero"
#en msgstr "9"

msgid "libro-redball-titulo"
#en msgstr "The red ball"

msgid "libro-redball-autor1"
#en msgstr "Authors - Farideh Khalatbaree"

msgid "libro-redball-autor2"
#en msgstr "Illustrators - Ali Mafakheri"

msgid "libro-redball-comentario1"
#en msgstr "The red ball was left in a cupboard for a long time, because his owner had grown up and did not like to play with him any longer. So the ball decided to leave the cupboard and try to find a new friend..."

msgid "libro-redball-comentario2"
#en msgstr "Awards - BolognaRagazzi Award -- New Horizons (awarded to the series)"

msgid "libro-redball-idioma"
#en msgstr "Persian / Farsi"

msgid "libro-redball-fecha"
#en msgstr "1383 (Iranian Calendar)"

Games

Games table:

title description
Etoys running on the OLPC display
Etoys A playground for your mind! It includes 2D and 3D graphics, images, text, particles, presentations, web-pages, videos, sound and MIDI, and so on. With it, you can build smart toys that do cool things. You can also share your creations with your friends!
need screenshot Block Party The classic falling block arcade game. Stack the blocks well and they disappear -- leave holes and they pile up. See how long you can last!
need screenshot Javascript games A collection of javascript games that are known to work, that you can play in your browser.
need screenshot Flash games A collection of games written in Flash that are known to work. You can also play these in your browser.


msgid "juegos-titulo"
#en msgstr "Games"
#es msgstr "Juegos"
#pt msgstr "Jogos"
#fr msgstr "Jeux"

msgid "etoys-titulo"
#en msgstr "eToys"
#es msgstr "eToys"
#pt msgstr "eToys"
#fr msgstr "eToys"

msgid "etoys-texto"
#en msgstr "A playground for your mind! It includes 2D and 3D graphics, images, text, particles, presentations, web-pages, videos, sound and MIDI, and so on. With it, you can build smart toys that do cool things. You can also share your creations with your friends!"
#es msgstr "Una plaza para tu mente! Incluye gráficos en 2 y 3 dimensiones, imágenes, texto, partículas, presentaciones, páginas web, videos, sonidos y MIDI, y cosas por el estilo. Con él se pueden contruir juguetes inteligentes que hacen cosas divertidas. También podés compartirlas con tus amigos!"

msgid "blockparty-titulo"
#en msgstr "Block Party"
#es msgstr "Fiesta de Bloques"

msgid "blockparty-texto"
#en msgstr "The classic falling block arcade game. Stack the blocks well and they disappear -- leave holes and they pile up. See how long you can last!"
#es msgstr "Al clásico juego de los bloques cayendo. Apilá los bloques correctamente y desaparecerán -- si dejas agujeros, se amontonan. A ver cuanto durás."

msgid "simcity-titulo"
#en msgstr "SimCity"
#es msgstr "SimCity"

msgid "simcity-texto"
#en msgstr "Try to manage the operations of a small town. See if you can grow it into a big city!"
#es msgstr "Intenta administrar las operaciones de un pequeño pueblo y ve cómo crece hasta convertirse una gran ciudad"

msgid "javascript-titulo"
#en msgstr "Javascript games"
#es msgstr "Juegos en JavaScript"

msgid "javascript-texto"
#en msgstr "A collection of javascript games that are known to work, that you can play in your browser."
#es msgstr "Una colección de juegos en JavaScript que se sabe que funcionan, y que podés jugar en tu navegador."

msgid "flash-titulo"
#en msgstr "Flash games"
#en msgstr "Juegos en Flash"

msgid "flash-texto"
#en msgstr "A collection of games written in Flash that are known to work. You can also play these in your browser."
#es "Una colección de juegos en Flash que se sabe que funcionan, y que también podés jugar en tu navegador"

po2dict - Python helper function

Takes pofiles as above and turns them into a python dictionary Mchua 13:58, 29 March 2007 (EDT)

# po2dict
# feed it the location of a .po file
# returns dictionary version of that file where
# dictionary[MSGINDEXSTRING][LANGUAGECODE] returns the proper string.
def po2dict(polocation):
    pofile = open(polocation, 'r')
    translations = {}
    currentmsgid = ""
    for line in pofile:
        if (line[0:5] == "msgid"): # create a new msgid
            currentmsgid = line[5:].lstrip(' "').rstrip(' "\n')
            translations[currentmsgid] = {}
        if (line[4:10] == "msgstr"):
            language = line[1:3] # get 2-letter language id
            translatedstring = line[10:].lstrip(' "').rstrip(' "\n')
            translations[currentmsgid][language] = translatedstring
    pofile.close()
    return translations

# usage example
dictionary = po2dict{"biology.po")
print dictionary["tiaga-notes"]["es"] # should print the Spanish string ("Lagos y muskegs...")