Skip to content
Browse files

Removing copy from parts 2 and 3 per fmarier

  • Loading branch information...
1 parent 6cd27a9 commit 405698f4f793f0f3c683f8cf3d7c137a9f73ea3a @ozten ozten committed
Showing with 9 additions and 9 deletions.
  1. +3 −3 localization/localization_part_2.md
  2. +6 −6 localization/localization_part_3.md
View
6 localization/localization_part_2.md
@@ -3,7 +3,7 @@
In our previous post "How to Localize Your Node.js service", we learned how to add i18n-abide to our code.
-We wrapped strings in templates files as well as JavaScript files with calls to a function `gettext`. As developers, our work ends there. But the work of getting our copy localized has just begun.
+We wrapped strings in templates files as well as JavaScript files with calls to a function `gettext`. As developers, our work ends there. But the work of getting our prose localized has just begun.
## The toolchain
@@ -14,7 +14,7 @@ It's had one of the biggest (and coolest) L10n communities in Open Source.
As a result, it has many existing tools and those at the lowest levels are sometimes old *crotchety* tools.
### Gettext
-GNU Gettext is a toolchain that allows you to localize copy and other strings from webapps or native apps. These are called strings (after the C name for ... strings). When you write your Node.js code and templates, you put English strings<sup>[1]</sup> in like normal, but you wrap them in a functional call to `gettext`.
+GNU Gettext is a toolchain that allows you to localize text from webapps or native apps. These are called strings (after the C name for ... strings). When you write your Node.js code and templates, you put English strings in like normal, but you wrap them in a function call to `gettext`.
Wrapping with `gettext` does a few different things for you:
* As a build step, you can extract all the strings into a string catalog
@@ -51,7 +51,7 @@ They have many tools such as [POEdit](http://www.poedit.net/), [Verbatim](https:
So our basic constraint is to create a solution that uses `PO` files, which is how we'll tell our localizers what all of our strings are and how they will give us the finished translations.
Coming from PHP and Python at Mozilla, I've found that Gettext works very well.
-As a web service gets large and has more copy, there are many nuances of localizing copy that require the well tested tools and APIs of gettext.
+As a web application gets large and has more prose, there are many nuances of localizing text that require the well tested tools and APIs of gettext.
## Providing PO Files to localizers
View
12 localization/localization_part_3.md
@@ -117,7 +117,7 @@ Now if you set your browser's preferred language to Italian/Switzerland (it-CH),
![](it-CH-chooser.png)
-This is a handy way to ensure your design and copy work for bi-directional languages like Hebrew.
+This is a handy way to ensure your visual design and prose work for bi-directional languages like Hebrew.
Your web designer can test their RTL CSS, before you have the resources to create actual Hebrew strings.
![](db-LB.png)
@@ -143,9 +143,9 @@ You can use `format` to keep HTML in your strings to a minimum.
Consider these three examples
- {{gettext('<p>Buy <a href="/buy?prod=blue&tyep=ticket">Blue Tickets</a> Now!</p>')}}
- <p>{{format(gettext('Buy <a href="%s">Blue Tickets</a> Now!', ['/buy?prod=blue&tyep=ticket']))</p>}}
- <p>{{format(gettext('Buy <a href="%(url)s">Blue Tickets</a> Now!', {url: '/buy?prod=blue&tyep=ticket'}))</p>}}
+ <%= gettext('<p>Buy <a href="/buy?prod=blue&tyep=ticket">Blue Tickets</a> Now!</p>') %>
+ <p><%= format(gettext('Buy <a href="%s">Blue Tickets</a> Now!', ['/buy?prod=blue&tyep=ticket'])) %></p>
+ <p><%= format(gettext('Buy <a href="%(url)s">Blue Tickets</a> Now!', {url: '/buy?prod=blue&tyep=ticket'})) %></p>
In the PO file, they produce these strings:
@@ -169,14 +169,14 @@ String interpolation is quite common in localizing software.
Another example is runtime data injected into your strings.
- <p>{{format(gettext('Welcome back, %(user_name)s'), {user_name: user.name})}}</p>
+ <p><%= format(gettext('Welcome back, %(user_name)s'), {user_name: user.name}) %></p>
## Avoid Inflexible Design
We need to put our L10n hats on early.
As early as when we review the initial graphic design of the website.
-Avoid putting copy into images. Use CSS to keep words as plain text positioned over images.
+Avoid putting text into images. Use CSS to keep words as plain text positioned over images.
Make sure [CSS is bulletproof](). An English word in German can be many times larger and destroy a
poorly planned design.

0 comments on commit 405698f

Please sign in to comment.
Something went wrong with that request. Please try again.