Skip to content

Commit

Permalink
Makes the info (credits) app translatable. Includes EN and ES versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
elondaits committed Jun 23, 2017
1 parent 33d503f commit 47717bc
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 14 deletions.
4 changes: 4 additions & 0 deletions common/js/jquery-3.2.1.min.js

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions info/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,29 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Info</title>
<script type="text/javascript" src="../common/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../common/js/i18n4js-1.2.0.min.js"></script>
<script type="text/javascript" src="js/default.js"></script>
<link rel="stylesheet" href="../common/css/default.css?v=1_1_2" media="screen" type="text/css">
</head>
<body>
<div class="credits">
<div class="credits" style="display:none;">
<div class="container">
<div class="col-12">
<h1>Credits</h1>
<h1 data-i18n-str="CREDITS"></h1>
</div>
<div class="col-6">
<p>All applications created by<br>
<p><span data-i18n-str="CREATED_BY"></span><br>
<strong>Jürgen Richter-Gebert</strong><br>
<span class="normalcaps">http://www.science-to-touch.com/</span></p>
<img class="qr" src="../common/img/science_to_touch-qr.png">
</div>
<div class="col-6">
<p>Applications adapted by<br>
<p><span data-i18n-str="ADAPTED_BY"></span><br>
<strong>IMAGINARY <span class="normalcaps">gGmbH</span></strong><br>
<span class="normalcaps">http://www.imaginary.org/</span>
</p>
<div class="longtext">
<p><strong>IMAGINARY</strong> creates and distributes interactive exhibits that communicate modern mathematics to the general
public. As a non profit organization we promote mathematical education and knowledge worldwide by offering
all content as open source on our website imaginary.org. We empower people to organize local
exhibitions and carry modern mathematics to every corner on earth.</p>
<p>Our philosophy and international network of math enthusiasts help us to constantly develop our content,
to produce new exhibits and to establish <strong>IMAGINARY</strong> as think tank for modern mathematics communication.</p>
<p>Started as project at the Mathematische Forschungsinstitut Oberwolfach in 2008 and spun-off in 2016
with support of the Leibniz Association, we have inspired millions of visitors in more than 50 countries
with our exhibits ever since.</p>
<div class="longtext" data-i18n-str="ABOUT_IMAGINARY">
</div>
</div>
</div>
Expand Down
12 changes: 12 additions & 0 deletions info/js/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$(function(){
IMAGINARY.i18n.init({
queryStringVariable: 'lang',
translationsDirectory: 'tr',
defaultLanguage: 'en'
}).then(function(){
$('[data-i18n-str]').each(function(){
$(this).html(IMAGINARY.i18n.t($(this).attr('data-i18n-str')));
});
$('.credits').fadeIn();
});
});
6 changes: 6 additions & 0 deletions info/tr/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"CREDITS": "Credits",
"CREATED_BY": "All applications created by",
"ADAPTED_BY": "Applications adapted by",
"ABOUT_IMAGINARY": "<p><strong>IMAGINARY</strong> creates and distributes interactive exhibits that communicate modern mathematics to the general public. As a non profit organization we promote mathematical education and knowledge worldwide by offering all content as open source on our website imaginary.org. We empower people to organize local exhibitions and carry modern mathematics to every corner on earth.</p> <p>Our philosophy and international network of math enthusiasts help us to constantly develop our content, to produce new exhibits and to establish <strong>IMAGINARY</strong> as think tank for modern mathematics communication.</p> <p>Started as project at the Mathematische Forschungsinstitut Oberwolfach in 2008 and spun-off in 2016 with support of the Leibniz Association, we have inspired millions of visitors in more than 50 countries with our exhibits ever since.</p>"
}
6 changes: 6 additions & 0 deletions info/tr/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"CREDITS": "Créditos",
"CREATED_BY": "Aplicaciones creadas por",
"ADAPTED_BY": "Aplicaciones adaptadas por",
"ABOUT_IMAGINARY": "<p><strong>IMAGINARY</strong> crea y distribuye exhibiciones interactivas que comunican las matemáticas modernas al público general. Como organización sin fines de lucro promovemos el aprendizaje y conocimiento de las matemáticas en todo el mundo ofreciendo todo el contenido como código abierto en nuestro sitio web, imaginary.org. Empoderamos a las personas para que organicen exhibiciones locales y lleven a las matemáticas modernas a cada rincón de la tierra.</p> <p>Nuestra filosofía y red internacional de entusiastas de las matemáticas nos ayudan a desarrollar constantemente nuestro contenido, producir nuevas exhibiciones y establecer a <strong>IMAGINARY</strong> como un laboratorio de ideas para la comunicación de las matemáticas modernas.</p> <p>Iniciada como un proyecto en el Mathematische Forschungsinstitut Oberwolfach en el 2008 y escindida en el 2016 con el apoyo de la Leibinz Association, inspiramos a millones de visitantes en más de 50 países con nuestras exhibiciones desde entonces.</p>"
}

0 comments on commit 47717bc

Please sign in to comment.