-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule-presentations-92.html
251 lines (246 loc) · 12.6 KB
/
schedule-presentations-92.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
---
permalink: /schedule/presentations/92/
title: 'DjangoCon US : Presentation: A Gringo''s Guide to Internationlization'
---
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8"/>
<title>DjangoCon US : Presentation: A Gringo's Guide to Internationlization</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<link href="../../../static/css/bde01dea2fa1.css" rel="stylesheet" type="text/css"/>
<!-- HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="../../../static/img/favicon.png" rel="shortcut icon"/>
<style>
a.unbookmark {
text-decoration: none;
padding-left: 20px;
background: url(http://2012.djangocon.us/static/img/star.png) no-repeat left;
}
a.bookmark {
text-decoration: none;
padding-left: 20px;
background: url(http://2012.djangocon.us/static/img/star_unselected.png) no-repeat left;
}
div.slot {
font-weight: bold;
}
</style>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"/>
</head>
<body class="talk_detail" id="">
<header id="site_header">
<h1><a href="../../../index.html">DjangoCon US 2012 - Washington, DC</a></h1>
<div id="account-bar">
<a href="../../../account/login/index.html">Log in</a> or <a href="../../../account/signup/index.html">Sign Up</a>
</div>
<nav id="site_nav">
<ul>
<li class="register_tab"><a href="http://djangoconus2012.eventbrite.com/">Register</a></li>
<li class="schedule_tab"><a href="../../index.html">Schedule</a></li>
<li class="venue_tab"><a href="../../../venue/index.html">Venue</a></li>
<li class="sponsors_tab"><a href="../../../sponsors/index.html">Sponsors</a></li>
<li class="lightning_tab"><a href="../../../lightning/index.html">Lightning Talks</a></li>
<li class="sprints_tab"><a href="../../../sprints/index.html">Sprints</a></li>
<li class="openspaces_tab"><a href="../../../open-spaces/index.html">Open Spaces</a></li>
<li class="about_tab"><a href="../../../about/index.html">About</a></li>
<li class="tutorials_tab"><a href="../../../tutorials/index.html">Tutorials</a></li>
</ul>
</nav>
</header>
<section id="main_content">
<h1 class="talk_title">A Gringo's Guide to Internationlization</h1>
<section class="meta">
A Talk presented by
<a href="../../../speaker/profile/93/index.html">Jacob Burch</a>
<div id="personal">
<a href="../../../account/login/index.html@next=%25252Fschedule%25252Fpresentations%25252F92%25252F.html">log in</a> to bookmark.
</div>
</section>
<h3>Audience level</h3>
<p>Novice</p>
<h3>Category</h3>
<p>How To/Intro</p>
<h3>Time</h3>
<p>September 4th, 1:30 p.m. – 2:10 p.m.</p>
<hr/>
<h3>Description</h3>
<p class="description">Coming from a speaker who escaped a notion to "why would we need to translate?" this talk aims to show what actually goes into translating a website or app using Django's Internationalization tools. Covered will be an overview of batteries included, best practices and anti-patterns in using them, and some third party tools to help make your life escaping the myth of a Lingua Franca easier.</p>
<hr/>
<div>
<h2>Abstract</h2>
</div>
<div class="abstract"><p>There's often a bubble in the English-speaking programming world that the entire internet runs on English. Our Top-level domains are shortened english words. Our programming languages--Python in particular--try to emulate English words and grammar.</p>
<p>Firmly in place in this world for many years, my first attempt to translate a pre-existing site came with a high sticker shock of nuanced difficulty. This talk covers all the lessons I learned in taking a fully-fleshed web app with no translation (and a programmer with no translation experience) to being completely translated.</p>
<h1>Talk Overview</h1>
<ol>
<li>Introduction to Translation<ol>
<li>Overview of gettext</li>
<li>Brief history of a translation<ol>
<li>Add gettext calls</li>
<li><code>django-admin.py makemessages</code></li>
<li>Ship po file to translation service</li>
<li>Receive file back</li>
<li>Compile</li>
<li>Fin</li>
</ol>
</li>
<li>gettext vs gettext_lazy</li>
</ol>
</li>
<li>Batteries Included<ol>
<li>gettext Python calls</li>
<li>Middleware</li>
<li>template tags<ol>
<li>trans vs. blocktrans</li>
</ol>
</li>
<li>Anti-patterns of the battery included use.<ol>
<li>Heavy whitespace in blocktrans</li>
<li>Monster-sized translations</li>
</ol>
</li>
</ol>
</li>
<li>The best laid plans of mice and men...<ol>
<li>Problems that get in the way of A history of a translation.<ol>
<li>Realize half the site is still untranslated</li>
<li>Edit out the translations you already had translated to avoid re-curring costs</li>
<li>Have the product adjust so two words change</li>
<li>Realize common text that's in the database</li>
<li>Fin?</li>
</ol>
</li>
<li>Patterns and tools to help<ol>
<li><code>poxx.py</code> and the idea of a 'canonical' po file.</li>
<li><code>dbgettext</code></li>
<li>Wholly-translated template files (translate_include, trans_render)</li>
</ol>
</li>
</ol>
</li>
<li>Advanced Translation Technique<ol>
<li>While undocumented, translation backend is pretty darn flexible and the source code is a treasure trove to make 'impossible' use cases not too bad.</li>
<li>Overview of how the translation service works behind the scenes<ol>
<li><code>_translation</code> thread local</li>
<li>Merged translations (root->app->default)</li>
<li>Sessions vs. Accept-Language</li>
<li>Middleware and Context processors</li>
</ol>
</li>
<li>Example of advanced translation code: Multi-tenancy translation.<ol>
<li>Translating some sites, not translating others</li>
<li>Translating Site A one way, Site B another</li>
<li>Using an English translation for duct-tape and profit.</li>
</ol>
</li>
</ol>
</li>
<li>Why Django's i18n sucks.<ol>
<li>In the vein of the "Django Sucks" Key note. It doesn't really, but it could use some changes--from minor to major.</li>
<li>Why .po Files are archaic and limited.</li>
<li>What we can do to improve for 1.5 and beyond.</li>
</ol>
</li>
</ol></div>
</section>
<div id="footer">
<div class="inner">
<div class="container">
<hr/>
<footer id="page_footer">
<section id="page_sponsors">
<h3>Sponsors</h3>
<a href="http://www.newrelic.com/"><img alt="New Relic, Inc." src="../../../media/cache/ad/9c/ad9ca4f829a01fbf5d9c3915d47fd26a.jpg"/></a>
<a href="http://cmgdigital.com/"><img alt="CMG Digital" src="../../../media/cache/f0/d7/f0d758d236ec6dc4b164c730a8e69bdd.jpg"/></a>
<a href="http://www.revsys.com/"><img alt="Revolution Systems" src="../../../media/cache/7d/bf/7dbfe4e3b375fb938cef12c7e756b2fa.jpg"/></a>
<a href="http://www.jetbrains.com/pycharm/"><img alt="Jet Brains" src="../../../media/cache/87/66/87664ff9a841cb55780a33310824b904.jpg"/></a>
<a href="http://www.caktusgroup.com/"><img alt="Caktus Consulting Group, LLC" src="../../../media/cache/be/e4/bee4e0b8539a7dfd3895a00bd1f0f638.jpg"/></a>
<a href="http://www.webcubecms.com/"><img alt="Web Cube" src="../../../media/cache/f8/a4/f8a473da2393bfb101699663b8abc553.jpg"/></a>
<a href="http://www.chicagodjango.com/"><img alt="Imaginary Landscape, LLC" src="../../../media/cache/32/7f/327fc581684a89a146cb9d7edd811ebe.jpg"/></a>
<a href="http://www.github.com/"><img alt="GitHub" src="../../../media/cache/6c/bf/6cbf65587c1e36b49317514ae45a1254.jpg"/></a>
<a href="https://www.counsyl.com/"><img alt="Counsyl" src="../../../media/cache/6b/46/6b46a0cd033de096b0ef067d8259820a.jpg"/></a>
<a href="http://caci.com./"><img alt="CACI" src="../../../media/cache/b2/37/b2370064505dcb72291927c0a73467bc.jpg"/></a>
<a href="http://www.teamcarney.com/default.aspx?utm_source=djangocon&utm_medium=banner&utm_campaign=djangocon"><img alt="Carney" src="../../../media/cache/8b/4b/8b4bb5bf17d464c85f27a09a59d0e274.jpg"/></a>
<a href="http://celerity.com/"><img alt="Celerity" src="../../../media/cache/da/1f/da1f620155d4b81266888cb4ca6fad1c.jpg"/></a>
<a href="http://lab305.com/"><img alt="Lab 305" src="../../../media/cache/07/48/0748738521108c82f10fe19726e37849.jpg"/></a>
<a href="http://www.wisertogether.com/"><img alt="Wiser Together" src="../../../media/cache/37/5a/375a48e8fcecb60a7a89d3e74c236367.jpg"/></a>
<a href="http://www.mozilla.com/"><img alt="Mozilla" src="../../../media/cache/4c/a4/4ca41c7eee1175790a957bafb4461b84.jpg"/></a>
<a href="http://tryolabs.com/"><img alt="Tryolabs" src="../../../media/cache/e5/f9/e5f9d4bf7df2edc3b8d632246b90da8f.jpg"/></a>
<a href="http://socialcodeinc.com/"><img alt="SocialCode" src="../../../media/cache/e6/c6/e6c6e0e96aabfc673739e196a3f42497.jpg"/></a>
<a href="http://toastdriven.com/"><img alt="Toast Driven" src="../../../media/cache/60/c0/60c0674b42a339f11f6ae9cf32401556.jpg"/></a>
<a href="http://www.devsar.com/"><img alt="Devsar" src="../../../media/cache/74/44/74448dd5c58c1499811cfdaded3daf3b.jpg"/></a>
<a href="http://lincolnloop.com/"><img alt="Lincoln Loop" src="../../../media/cache/ad/83/ad831d1142c5a4cf59b7e943e5398ee6.jpg"/></a>
<a href="http://www.stickermule.com/"><img alt="Sticker Mule" src="../../../media/cache/ef/39/ef3954931c41170fe37abde34dda6c29.jpg"/></a>
<a href="http://unifiedsocial.com/"><img alt="Unified" src="../../../media/cache/0a/59/0a5923d4975f4326bead3e38de0c50db.jpg"/></a>
<a href="http://theopenbastion.com/"><img alt="The Open Bastion" src="../../../media/cache/12/34/1234b43bbc5a7db6efd6a2cdcaa6ca90.jpg"/></a>
<a href="http://www.chicagodjango.com/"><img alt="Imaginary Landscape" src="../../../media/cache/84/81/8481bde3f62f559916ba24b83d59ac6c.jpg"/></a>
</section>
<hr/>
<p>DjangoCon US 2012 is a production of <a href="http://theopenbastion.com">The Open Bastion</a>.</p>
<p><strong>Django</strong> is a registered trademark of the <a href="http://djangoproject.com/foundation">Django Software Foundation</a>.</p>
<p>Questions? Comments? <a href="mailto:[email protected]">[email protected]</a>.</p>
</footer>
</div>
</div>
</div>
<script src="../../../static/pinax/js/jquery-1.7.1.min.js"></script>
<script src="../../../static/pinax/js/jquery.form.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-alert.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-modal.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-button.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-carousel.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-collapse.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-dropdown.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-scrollspy.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-tab.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-tooltip.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-popover.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-transition.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-typeahead.js"></script>
<script src="../../../static/pinax/js/theme.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a.bookmark").live("click", function() {
aElem = $(this);
instructions = aElem.next(".instructions")
$.ajax({
type: "POST",
url: this.href,
data: "action=add;csrfmiddlewaretoken=844d93ba92ff165d207fd1c6c0c115f7",
success: function() {
aElem.removeClass("bookmark");
aElem.addClass("bookmarked");
instructions.html("← click to unbookmark");
},
error: function(xhr, options, error) {
alert(xhr.status);
}
});
return false;
});
$("a.bookmarked").live("click", function() {
aElem = $(this);
instructions = aElem.next(".instructions")
$.ajax({
type: "POST",
url: this.href,
data: "action=delete;csrfmiddlewaretoken=844d93ba92ff165d207fd1c6c0c115f7",
success: function(response) {
aElem.removeClass("bookmarked");
aElem.addClass("bookmark");
instructions.html("← click to bookmark")
},
error: function(xhr, options, error) {
alert(xhr.status);
}
});
return false;
});
});
</script>
</body>
</html>