Size: 14882
Comment: Another "What if"
|
Size: 15714
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
= Best practices for translating software projects = | = Launchpad project translation Best Practices = |
Line 9: | Line 9: |
The guide found under [[Translations/YourProject|Your Project]] will introduce you to how translations are done in Launchpad Translations. It assumes familiarity with gettext and points to different options as well as suggesting how to do things. This page is different in that it explains one recommended way to set up your software project for translations using Launchpad. There are other ways of doing things but they will not be mentioned here. |
This guide provides a set of recommendations for managing translations for your project on Launchpad. '''Note''': There are many Launchpad translation features and options that are not discussed here. This page recommends a simple approach that may be the best fit for most projects. '''Note''': If your project is used in Ubuntu Main, you need to consider whether it should be separately translated in your project or only in Ubuntu. This page assumes the project is not in Ubuntu Main (but it does apply to projects in Ubuntu Universe or Multiverse). |
Line 15: | Line 17: |
This guide assumes that you have not yet done any internationalization (i18n) on your software project nor that any translations (localization, l10n) have been done yet. You have written a great program using English as its interface language and now you want to have it translated into other languages using Launchpad. == Your project and user name == For demonstration purposes we assume that your project is called "Frobnob" and is available at https://launchpad.net/frobnob on Launchpad. Whenever you see this name replace it with the name of your project. For your user name, we assume "joe" in the same manner. If you have not yet registered you project on Launchpad, [[https://help.launchpad.net/Projects/Registering|read about it here]]. (Now, please don't go and register the frobnob project on Launchpad for fun. You can do that on our [[https://staging.launchpad.net/|sandbox server]], if you really want to.) = Prepare the source code = This part is often called the actual "internationalization (i18n)" because it enables the translation of your otherwise monolingual software. Please be aware that Launchpad (and really also gettext) only supports translations from American English (en_US) to other languages. If your software uses a different language you will need to translate it to English first. |
* You have written a program using US English as its interface language, and now you want to have it translated into other languages using Launchpad * You have not yet done any internationalization (i18n) on your software project * No translations (localization, l10n) have been done '''Note''': Messages in source code must be in US English. Gettext and Launchpad require this. == Demonstration project and user name == For examples in this page, let's assume: * The Launchpad project is named "frobnob". Like all projects, frobnob would be hosted at https://launchpad.net/frobnob on Launchpad. * Your user name is "joe". '''Note''': The frobnob project does not exist on Launchpad. It is used here only for examples. '''Tip''': If you have not yet created your project on Launchpad, [[https://help.launchpad.net/Projects/Registering|read about it here]]. = Preparing the source code = Your source code has to be set up to support translation with GNU gettext. '''Note''': This step is called "internationalization (i18n)" because it enables the translation of your monolingual software. |
Line 31: | Line 41: |
GNU gettext is the standard software used in most Free Software projects for internationalization. You can find it on the [[http://www.gnu.org/software/gettext/|GNU website]] but you can expect it to be available in all modern Linux distributions. It consists of tools to use by developers and translators as well as a library that inserts the translations into the application at run time. At this point you should familiarize yourself with how to prepare program sources using gettext. The [[http://www.gnu.org/software/gettext/manual/gettext.html#Sources|gettext manual]] explains general aspects of this as well as giving examples in the C programming language. Other programming languages have their own APIs to the gettext library, like the [[http://docs.python.org/library/gettext.html|gettext module]] in Python. |
[[http://www.gnu.org/software/gettext/|GNU gettext]] is the standard internationalization framework used in most free software projects. Gettext is installed by default in Ubuntu as the "gettext" package. Gettext consists of: * Tools for developers and translators * A library that retrieves translations at run time Your source code must use the gettext API. The [[http://www.gnu.org/software/gettext/manual/gettext.html#Sources|gettext manual]] provides detailed explanations and has examples in the C programming language. Other programming languages have their own APIs to the gettext library, For example, Python has a [[http://docs.python.org/library/gettext.html|gettext module]]. |
Line 37: | Line 55: |
You need to choose a translation domain for your software. This domain is a name that identifies your translations at run time and needs to be unique on any system where your software will be installed. Usually it is identical to the name of the package that your software is distributed as which in turn is commonly reflected in the name of the Launchpad project. Multiple executables can share the same translation domain and usually do if they are from the same package. The translation domain will be used as the filename for your translation template and Launchpad will use this name when referring to the template. Because it will be used in Launchpad URLs, this name is restricted to lowercase letters (a-z), numbers 0-9), dashes (-), and dots (.). For our demonstration purposes, "frobnob" would be a fitting translation domain. == Creating translatable strings == The gettext manual explains about [[http://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings|pitfalls when marking translatable strings]]. Please make sure to avoid these and make sure that the string the translator will see in Launchpad is meaningful and therefore translatable. Launchpad supports [[http://www.gnu.org/software/gettext/manual/gettext.html#Contexts|translation contexts]] and source comments which are displayed to the translator for help. Placing a comment that begins with "TRANSLATORS:" before a translatable string will create such a comment. = Build the template = Once all English strings in the source code have been marked for translations they need to be extracted into what is called the "translation template". This file will be imported into Launchpad to make these strings available to translation. Use the [[http://www.gnu.org/software/gettext/manual/gettext.html#Template|xgettext program]] to create the template. The output file should be renamed to "frobnob.pot". Integrate the creation of the template into your build system, e.g. add the xgettext call to your Makefile. Place the template into its own directory in your tree. This directory is usually called "po" and found in the root of your package. If you have multiple templates for your software (advanced setup), make sure to place each in its own directory, usually called "po-frobnob", or whatever the other templates are called. = Create a Bazaar branch = Launchpad uses [[http://www.bazaar-vcs.org/|Bazaar]] for source code repositories and Launchpad Translations makes use of these to import translation templates. Since your project needs to be Open Source in order to use Launchpad for free, you should use this as the way to publish your source code. Do ''not'' create a separate repository for your i18n-related files. |
Gettext requires that your project has a unique translation doman. It uses this domain and the user's locale (language and region) to find the translation catalog that is used to retrieve translations at run time. The translation domain is usually the name of the source package, which should also be the name of your Launchpad Project (all lower case). So in this case: * Launchpad Project: "frobnob" * Source package name: "frobnob" * Translation domain: "frobnob" The translation domain is used as the filename for your Launchpad translation template. (In gettext terms, this is the pot file: frobnob.pot.) '''Note''': The translation domain is restricted to lowercase letters (a-z), numbers (0-9), dashes (-), and dots (.). (This is because the domain is used in Launchpad URLs. For example. LimeWire's template is named "limewire", and here is the Launchpad URL to it: [[https://translations.launchpad.net/limewire/trunk/+pots/limewire]]) == Important Notes on Gettext == It is important that you use the gettext API in your source code properly. Otherwise: * Translators may not have enough information * Plurals may not be properly translated In short, your translations may not be of high quality and other problems may occur. So, take some time to review the gettext manual, especially where it explains [[http://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings|pitfalls when marking translatable strings]]. Please: * Avoid these pitfalls. * Add comments to provide translators helpful information. Placing a comment that begins with "TRANSLATORS:" before a translatable string creates a comment. * Use [[http://www.gnu.org/software/gettext/manual/gettext.html#Contexts|translation contexts]] where appropriate. = Building the template = All messages in the sources code that are marked for translation with the gettext API are extracted into the "template". (In gettext terms, this is the pot file). In our example, the template is "po/frobnob.pot". '''Note''': All translation-specific files are in the po/ directory. You need to keep the template consistent with the set of messages in the source code by regenerating it whenever source code changes. '''Tip''': Set up the package to use "intltool". With intltool, you generate/update the template with {{{intltool-update -p}}} (in the po/ directory). This approach supports a wide range of source code file types, such as C and Python, desktop files, gconf, and more. The template is what tells Launchpad what messages are in your source code that need translations, so updating it is critical. '''Note''': At a lower level, intltool uses the [[http://www.gnu.org/software/gettext/manual/gettext.html#Template|xgettext program]] to create the template. You can use that approach as well. In this case you will need to explicitly set the filename of the generated template with the {{{-o frobnob.pot}}} option. Setting up your package for template generation is an important and non-trivial topic and is covered elsewhere. '''Note''': Some source packages have multiple templates (for example [[https://translations.edge.launchpad.net/ubuntu/lucid/+source/gtk+2.0/+translations|gtk+2.0]]). This is an advanced topic not covered here. = Creating a Bazaar branch = Launchpad uses [[http://www.bazaar-vcs.org/|Bazaar]] for source code repositories. Launchpad Translations makes use of these to import translation templates. Since your project needs to be Open Source in order to use Launchpad for free, you should use this as the way to publish your source code. Do ''not'' create a separate repository for your i18n-related files. |
Line 65: | Line 113: |
bzr commit -m"Initial commit." | bzr commit -m "Initial commit." |
Line 69: | Line 117: |
Be sure to include the "po" directory and the template file in this branch. The template file is normally considered a temporary file because it can be created from the sources at any time and holds no separate information. Although this would speak against putting it under version control it is currently necessary in order to provide an easy way of uploading it to Launchpad. Eventually, Launchpad will be able to generate the template by itself from the sources but that feature is still under development. |
'''Tip''': Be sure to add the "po/" directory and the template file "po/frobnob.pot" to the branch. '''Note''': Template files are not usually added to a bzr branch because they are generated as needed. However, Launchpad Translations currently uses the template file to learn what messages need translation, so it is necessary at this time to add it to bzr source control. (We expect that this will not be necessary later.) |
Line 78: | Line 126: |
bzr commit -m"Description of change." | bzr commit -m "Description of change." |
Line 86: | Line 134: |
== Enable the translations feature == If not already done, enable translations for your project at this URL: https://launchpad.net/frobnob/+configure-translations. == Set the source code branch == You may have noticed that you pushed the Bazaar branch to a URL under your own name. Now you need to tell Launchpad that this is the main source code location for your "trunk" series. A "trunk" series is always created with your project. |
== Enabling Translations == If not already done, enable translations for your project at this URL: [[https://launchpad.net/frobnob/+configure-translations]] == Setting the source code branch == You may have noticed that you pushed the Bazaar branch to a URL under your own name. Now you need to tell Launchpad that this is the main source code location for your "trunk" series. A "trunk" series is a required part of every Launchpad project. |
Line 96: | Line 144: |
== Enable translation imports == | == Enabling translation imports == |
Line 102: | Line 150: |
== Import the template into Launchpad == The import of your template happens automatically whenever the file is update in the Bazaar branch. You can watch the progress of the import on the import queue page for your project: https://translations.launchpad.net/frobnob/+imports. It will initially be marked as "Approved" and later change to "Imported". Depending on the server load, the import may take a few hours but usually happens much quicker. |
== Importing the template into Launchpad == The import of your template happens automatically whenever the file is updated in the trunk branch. You can watch the progress of the import on the import queue page for your project here: [[https://translations.launchpad.net/frobnob/+imports]]. It is initially marked as "Approved" and is later changed to "Imported". Depending on the server load, the import may take a few hours but usually happens much more quickly. |
Line 110: | Line 158: |
You as the maintainer are most likely not the one doing the translations into all the different languages. In fact, you came to Launchpad Translations for the very reason to find translators in its community. But how do you know the translations contributed from community members are correct and of good quality? That's what translation groups are for. When you look at the [[https://translations.launchpad.net/+groups/launchpad-translators|Launchpad translators]] group you see that it consists of translation teams for quite a few languages. The members of these teams are experts for translations to their language and usually native speakers. These are the people that will help you ensure good quality translations. Go to https://translations.launchpad.net/frobnob/+settings and chose "Launchpad Translators" as the translation group and "Structured" as the translation permission. Then set the translation focus to "Frobnob trunk" and click "Change". Now translations for the languages covered by Launchpad Translators can only be approved by the members of the respective language team. Any registered user of Launchpad can still make suggestions, but it is the teams that review and accept or decline them. |
You as the maintainer are most likely not the one doing the translations into all the different languages. In fact, you may have come to Launchpad Translations in order to find translators. But how do you know the translations contributed through Launchpad and its commununity are correct and of good quality? That's what translation groups are for. Take a look at the [[https://translations.launchpad.net/+groups/launchpad-translators|Launchpad translators]] group and you will see that it consists of translation teams for many languages. The members of these teams are translation experts and are usually native speakers. These are the people that will help you ensure good quality translations. So, go to https://translations.launchpad.net/frobnob/+settings and chose "Launchpad Translators" as the translation group and "Structured" as the translation permission. Then set the translation focus to "Frobnob trunk" and click "Change". Now translations for the languages covered by Launchpad Translators can only be approved by the members of the respective language team. Any registered user of Launchpad can still make suggestions, but it is these teams that review and accept or decline them. |
Line 120: | Line 172: |
= Export translations from Launchpad = == Setup export to your branch == |
= Exporting translations from Launchpad = == Setting up export to your branch == |
Line 126: | Line 178: |
In the right column click "Choose a target branch", then enter "lp:frobnob" as the branch name and click "Update". This directs Launchpad to export the translations into the same branch where it imports the template from. You can await the export on the branches page under "Recent revisions": https://code.launchpad.net/~joe/frobnob/trunk Please remember that exports only happen once a day and only if there are any new translations to export. == Update your local branch == |
In the right column click "Choose a target branch", then enter "lp:frobnob" as the branch name and click "Update". This directs Launchpad to export the translations into the same branch where it imports the template from (the trunk branch). You can await the export on the branches page under "Recent revisions": https://code.launchpad.net/~joe/frobnob/trunk. '''Note''': Exports only happen once a day and only if there are any new translations to export. == Updating your local branch == |
Line 139: | Line 193: |
= Deploy the translations = The translations are shipped with binary packages in the also binary MO format. MO files are created from PO files using the [[http://www.gnu.org/software/gettext/manual/gettext.html#Binaries|gettext msgfmt utility]]. MO files are usually installed as "/usr/share/locale/ll/LC_MESSAGES/frobnob.mo" where "ll" is the respective language code. Remember that "frobnob" here is the translation domain that you chose in the beginning. You should integrate the MO file creation into the install portion of your build system, i.e. include it in you Makefile. |
= Deploying translations = The translations are shipped with binary packages in the binary MO format. MO files are created from PO files using the [[http://www.gnu.org/software/gettext/manual/gettext.html#Binaries|gettext msgfmt utility]]. MO files are usually installed as "/usr/share/locale/ll/LC_MESSAGES/frobnob.mo" where "ll" is the respective language code. Remember that "frobnob" here is the translation domain that you chose in the beginning. You should integrate the MO file creation into the install portion of your build system, i.e. include it in you Makefile. '''Tip''': Set up your package to use standard approaches for mo file generation and distribution. Do not try to write your own. Check packages in Ubuntu Main to use as examples. |
Line 145: | Line 201: |
Some help for special situations or hick-ups you might encounter. | Some help for special situations or issues you might encounter. |
Line 149: | Line 205: |
When ever you make changes to your source code you should commit those changes as described earlier. If Launchpad exported translations while you committed to your local branch, the two copies will differ. A subsequent "bzr push" or "bzr pull" will complain about the branches having diverged. This is no big problem as you can simply merge the changes that Launchpad made to your branch into your local copy and then push that updated version back out to Launchpad. These are the commands to do that. | When ever you make changes to your source code you should commit those changes as described above. If Launchpad exported translations while you committed to your local branch, the two copies will differ. A subsequent "bzr push" or "bzr pull" will complain about the branches having diverged. You can simply merge the changes that Launchpad made to your branch into your local copy and then push that updated version back out to Launchpad. These are the commands to do that. |
Line 154: | Line 210: |
bzr commit -m"Merged translation exports." | bzr commit -m "Merged translation exports." |
Launchpad Help > Translations > Your Project > Best practices
Launchpad project translation Best Practices
About this page
This guide provides a set of recommendations for managing translations for your project on Launchpad.
Note: There are many Launchpad translation features and options that are not discussed here. This page recommends a simple approach that may be the best fit for most projects.
Note: If your project is used in Ubuntu Main, you need to consider whether it should be separately translated in your project or only in Ubuntu. This page assumes the project is not in Ubuntu Main (but it does apply to projects in Ubuntu Universe or Multiverse).
Assumptions
- You have written a program using US English as its interface language, and now you want to have it translated into other languages using Launchpad
- You have not yet done any internationalization (i18n) on your software project
- No translations (localization, l10n) have been done
Note: Messages in source code must be in US English. Gettext and Launchpad require this.
Demonstration project and user name
For examples in this page, let's assume:
The Launchpad project is named "frobnob". Like all projects, frobnob would be hosted at https://launchpad.net/frobnob on Launchpad.
- Your user name is "joe".
Note: The frobnob project does not exist on Launchpad. It is used here only for examples.
Tip: If you have not yet created your project on Launchpad, read about it here.
Preparing the source code
Your source code has to be set up to support translation with GNU gettext.
Note: This step is called "internationalization (i18n)" because it enables the translation of your monolingual software.
GNU gettext
GNU gettext is the standard internationalization framework used in most free software projects.
Gettext is installed by default in Ubuntu as the "gettext" package.
Gettext consists of:
- Tools for developers and translators
- A library that retrieves translations at run time
Your source code must use the gettext API.
The gettext manual provides detailed explanations and has examples in the C programming language. Other programming languages have their own APIs to the gettext library, For example, Python has a gettext module.
Translation domain
Gettext requires that your project has a unique translation doman. It uses this domain and the user's locale (language and region) to find the translation catalog that is used to retrieve translations at run time.
The translation domain is usually the name of the source package, which should also be the name of your Launchpad Project (all lower case).
So in this case:
- Launchpad Project: "frobnob"
- Source package name: "frobnob"
- Translation domain: "frobnob"
The translation domain is used as the filename for your Launchpad translation template. (In gettext terms, this is the pot file: frobnob.pot.)
Note: The translation domain is restricted to lowercase letters (a-z), numbers (0-9), dashes (-), and dots (.). (This is because the domain is used in Launchpad URLs. For example. LimeWire's template is named "limewire", and here is the Launchpad URL to it: https://translations.launchpad.net/limewire/trunk/+pots/limewire)
Important Notes on Gettext
It is important that you use the gettext API in your source code properly. Otherwise:
- Translators may not have enough information
- Plurals may not be properly translated
In short, your translations may not be of high quality and other problems may occur.
So, take some time to review the gettext manual, especially where it explains pitfalls when marking translatable strings.
Please:
- Avoid these pitfalls.
- Add comments to provide translators helpful information. Placing a comment that begins with "TRANSLATORS:" before a translatable string creates a comment.
Use translation contexts where appropriate.
Building the template
All messages in the sources code that are marked for translation with the gettext API are extracted into the "template". (In gettext terms, this is the pot file).
In our example, the template is "po/frobnob.pot".
Note: All translation-specific files are in the po/ directory.
You need to keep the template consistent with the set of messages in the source code by regenerating it whenever source code changes.
Tip: Set up the package to use "intltool". With intltool, you generate/update the template with intltool-update -p (in the po/ directory). This approach supports a wide range of source code file types, such as C and Python, desktop files, gconf, and more.
The template is what tells Launchpad what messages are in your source code that need translations, so updating it is critical.
Note: At a lower level, intltool uses the xgettext program to create the template. You can use that approach as well. In this case you will need to explicitly set the filename of the generated template with the -o frobnob.pot option.
Setting up your package for template generation is an important and non-trivial topic and is covered elsewhere.
Note: Some source packages have multiple templates (for example gtk+2.0). This is an advanced topic not covered here.
Creating a Bazaar branch
Launchpad uses Bazaar for source code repositories. Launchpad Translations makes use of these to import translation templates. Since your project needs to be Open Source in order to use Launchpad for free, you should use this as the way to publish your source code. Do not create a separate repository for your i18n-related files.
If your project is stored locally in the "frobnob" directory, use these commands to create a "trunk" branch on Launchpad:
cd frobnob bzr init bzr add bzr commit -m "Initial commit." bzr push --remember lp:~joe/frobnob/trunk
Tip: Be sure to add the "po/" directory and the template file "po/frobnob.pot" to the branch.
Note: Template files are not usually added to a bzr branch because they are generated as needed. However, Launchpad Translations currently uses the template file to learn what messages need translation, so it is necessary at this time to add it to bzr source control. (We expect that this will not be necessary later.)
Whenever the source code changes and you generate a new template file, update the branch on Launchpad with these commands:
cd frobnob bzr add # Only if new files were created. bzr commit -m "Description of change." bzr push
You can view your branch in Launchpad by going to its URL https://code.launchpad.net/~joe/frobnob/trunk.
Set up your project in Launchpad
Enabling Translations
If not already done, enable translations for your project at this URL: https://launchpad.net/frobnob/+configure-translations
Setting the source code branch
You may have noticed that you pushed the Bazaar branch to a URL under your own name. Now you need to tell Launchpad that this is the main source code location for your "trunk" series. A "trunk" series is a required part of every Launchpad project.
Got to this URL https://launchpad.net/frobnob/trunk/+linkbranch and select the branch named ~joe/frobnob/trunk. To do this, click on "Choose" and search for "joe". Your branch should come right up. Once this is done, you can refer to it as simply "lp:frobnob".
Enabling translation imports
Now you are ready to tell Launchpad to import your translation template from the branch you pushed to Launchpad. Go to this URL to do so: https://translations.launchpad.net/frobnob/trunk/+translations-settings
At the bottom of the left side of the page select the second option: "Import template files". Above that you see a reference to the official Bazaar branch you created in the last step. Click on "Save settings" to activate the import.
Importing the template into Launchpad
The import of your template happens automatically whenever the file is updated in the trunk branch. You can watch the progress of the import on the import queue page for your project here: https://translations.launchpad.net/frobnob/+imports. It is initially marked as "Approved" and is later changed to "Imported". Depending on the server load, the import may take a few hours but usually happens much more quickly.
Once your template has been imported, you can see it in Launchpad at this URL: https://translations.launchpad.net/frobnob/trunk/+pots/frobnob
Translation permission and group
You as the maintainer are most likely not the one doing the translations into all the different languages. In fact, you may have come to Launchpad Translations in order to find translators.
But how do you know the translations contributed through Launchpad and its commununity are correct and of good quality? That's what translation groups are for.
Take a look at the Launchpad translators group and you will see that it consists of translation teams for many languages. The members of these teams are translation experts and are usually native speakers. These are the people that will help you ensure good quality translations.
So, go to https://translations.launchpad.net/frobnob/+settings and chose "Launchpad Translators" as the translation group and "Structured" as the translation permission. Then set the translation focus to "Frobnob trunk" and click "Change". Now translations for the languages covered by Launchpad Translators can only be approved by the members of the respective language team. Any registered user of Launchpad can still make suggestions, but it is these teams that review and accept or decline them.
Translate!
Now the actual translating can start!
Please read the Launchpad Translators instructions for project maintainers. You should also join the team on Launchpad and subscribe to the mailing list. On this list you can announce your new project and ask people to translate it.
Exporting translations from Launchpad
Setting up export to your branch
Translations done in Launchpad need to be exported back to your project branch so that you can include them in releases of your software. Launchpad provides automatic daily export of new translations to your branch. Go to the settings page to enable this: https://translations.launchpad.net/frobnob/trunk/+translations-settings
In the right column click "Choose a target branch", then enter "lp:frobnob" as the branch name and click "Update". This directs Launchpad to export the translations into the same branch where it imports the template from (the trunk branch). You can await the export on the branches page under "Recent revisions": https://code.launchpad.net/~joe/frobnob/trunk.
Note: Exports only happen once a day and only if there are any new translations to export.
Updating your local branch
To download the translations to your local copy of the branch, simply pull in the changes from Launchpad:
cd frobnob bzr pull
The translations will be placed in the "po" directory where your template file resides. They are in PO format and are named according to the language code, e.g. "po/fr.po" for the French translations.
Deploying translations
The translations are shipped with binary packages in the binary MO format. MO files are created from PO files using the gettext msgfmt utility. MO files are usually installed as "/usr/share/locale/ll/LC_MESSAGES/frobnob.mo" where "ll" is the respective language code. Remember that "frobnob" here is the translation domain that you chose in the beginning. You should integrate the MO file creation into the install portion of your build system, i.e. include it in you Makefile.
Tip: Set up your package to use standard approaches for mo file generation and distribution. Do not try to write your own. Check packages in Ubuntu Main to use as examples.
What if ... ?
Some help for special situations or issues you might encounter.
What if I made changes to my local copy of the branch while translations were exported into the Launchpad copy?
When ever you make changes to your source code you should commit those changes as described above. If Launchpad exported translations while you committed to your local branch, the two copies will differ. A subsequent "bzr push" or "bzr pull" will complain about the branches having diverged. You can simply merge the changes that Launchpad made to your branch into your local copy and then push that updated version back out to Launchpad. These are the commands to do that.
cd frobnob bzr merge lp:frobnob bzr commit -m "Merged translation exports." bzr push
Now both your branches will be identical again. You should not encounter any conflicts during the merge because the translations export will only touch PO files in the "po" directory which you should not be editing manually when working with Launchpad.
What if the translation statistics never show my strings as "translated"?
On the translations overview page for your project, project series or template, i.e. https://translations.launchpad.net/frobnob/trunk, you see a color-coded status bar for each language. As they start out red when all strings are untranslated, maintainers expect these to turn green as translation work progresses. For projects that work entirely on Launchpad, though, the target color is purple which means "Newly translated in Launchpad".
There is work under way that will redefine and simplify the different statuses.
What if I already have translations for my project?
It is least error-prone to do a full switch to using Launchpad Translations. Any translations that you may already have when you begin using Launchpad Translations can be imported, though, so they are not lost. This assumes that these are already available in PO files.
Place the PO files into your "po" directory, named the same way as Launchpad would do, e.g. "po/fr.po" for the French translations. Use "bzr add", "bzr commit" and "bzr push" as described earlier to copy them to Launchpad. Now go to this page on Launchpad: https://translations.launchpad.net/frobnob/trunk/+request-bzr-import and click "Request one-time import". This will place all the translation files into the import queue from where they will eventually be imported.
Please be aware that although all translations done in Launchpad are BSD-licensed, translations imported like this retain their original license.