Hi,

Firstly, thanks for the module, it's really usefull.

I've found a little bug, when you are working in a website where the default language isn't English. You cannot export this default language.

As an example, I'm working in a website with three languages: Spanish, Catalan and English. The default one is Spanish. When I go to export the translations I only can export Catalan and English.

I've taken a look at the code and I've fond that it can be solved pretty easily so I created a path. I've attached it.

I can be great to have it commited.

Thank you very much.

CommentFileSizeAuthor
#3 1840386-3.patch782 bytesdrifter
default-language.patch691 bytesluisortizramos

Comments

infojunkie’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drifter’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs review
StatusFileSize
new782 bytes

In fact, this bug reappeared with the introduction of the translations_features_string_source_language() check. The basic problem I think is that the default, built-in string translations always have English as the source language, while i18n strings could have different languages (for example, on our site the default language is Hungarian, i18nstrings uses Hungarian as a default, but interface strings are based on English of course).

Attached is a patch that takes this into account, this allowed me to download my translated strings.

infojunkie’s picture

Thanks. Can you point to relevant code from Drupal core or i18n module to *prove* that the default text group's source language is always English? I will look too, but it would be good to get confirmation from you as well.

drifter’s picture

Strings enclosed in the t() function, which is what the default text group is, should always be English, since that is what Drupal core and contrib authors use.

See for example:

https://drupal.org/node/1279668

"In contrast to Drupal's standard localization system, which always translates from English, [i18n] strings will be translated from the source language."

Also see locale.inc and locale.module, for instance in locale.inc:


/**
 * List languages in search result table
 */
function _locale_translate_language_list($translation, $limit_language) {
  // Add CSS.
  drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css');

  $languages = language_list();
  unset($languages['en']);
  $output = '';
  foreach ($languages as $langcode => $language) {
...
infojunkie’s picture

Thanks for going the extra step. Committed your fix to the latest dev.

infojunkie’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.