Do not try to update the Official BOINC resource, as this is handled by other means; only update translations

Also be sure to skip updating english translations (this was done improperly)

(DBOINCP-141)
This commit is contained in:
Tristan Olive 2015-04-17 12:23:48 -04:00
parent c096ade1a6
commit 8d13b21ee8
1 changed files with 2 additions and 10 deletions

View File

@ -322,7 +322,7 @@ function boinctranslate_export_translations() {
}
// Try to export translations for all enabled languages
foreach ($enabled_languages as $langcode => $language_name) {
if ($langcode == en) {
if ($langcode == 'en') {
continue;
}
$po_file = boinctranslate_get_po($langcode, 'project');
@ -394,14 +394,6 @@ function boinctranslate_update_official_boinc_translations() {
$result = "ERROR: The {$drupal_resource} resource does not exist"
. " in the {$project_name} project at Transifex";
}
else {
// Update the source
$path = "project/{$project_name}/resource/{$drupal_resource}/content";
$post = array(
'content' => boinctranslate_get_po('en', 'boinc')
);
$result = boinctranslate_transifex_request($path, $post);
}
}
if ($result AND substr($result, 0, 6) != 'ERROR:') {
@ -414,7 +406,7 @@ function boinctranslate_update_official_boinc_translations() {
}
// Try to export translations for all enabled languages
foreach ($enabled_languages as $langcode => $language_name) {
if ($langcode == en) {
if ($langcode == 'en') {
continue;
}
$po_file = boinctranslate_get_po($langcode, 'boinc');