summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-06-18 12:44:05 -0700
committerAndy Staudacher <andy.st@gmail.com>2009-06-18 12:44:05 -0700
commitb6290b45cfbe875503bb7d6554e960d7007f3a06 (patch)
tree64741dd92981e8c862fccbc8668fce7e9af9226a /modules
parent5ef6db85fb501ba39b06b61d312931dd789b5426 (diff)
Fix format of source message in l10n client (adding a newline between plural forms)
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/js/l10n_client.js9
-rw-r--r--modules/gallery/views/l10n_client.html.php1
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js
index 89c4a57d..4936d1cc 100644
--- a/modules/gallery/js/l10n_client.js
+++ b/modules/gallery/js/l10n_client.js
@@ -93,12 +93,13 @@ jQuery.extend(Gallery, {
// Display the source message
this.showSourceMessage = function(source, is_plural) {
if (is_plural) {
- var pretty_source = '[one] - ' + source['one'] + "\n";
- pretty_source += '[other] - ' + source['other'];
+ var pretty_source = $('#source-text-tmp-space').text('[one] - ' + source['one']).html();
+ pretty_source += '<br/>';
+ pretty_source += $('#source-text-tmp-space').text('[other] - ' + source['other']).html();
} else {
- var pretty_source = source;
+ var pretty_source = $('#source-text-tmp-space').text(source).html();
}
- $('#l10n-client-string-editor .source-text').text(pretty_source);
+ $('#l10n-client-string-editor .source-text').html(pretty_source);
}
this.isPluralMessage = function(message) {
return typeof(message) == 'object';
diff --git a/modules/gallery/views/l10n_client.html.php b/modules/gallery/views/l10n_client.html.php
index 01537e25..c15f4b0e 100644
--- a/modules/gallery/views/l10n_client.html.php
+++ b/modules/gallery/views/l10n_client.html.php
@@ -30,6 +30,7 @@
<div id="l10n-client-string-editor">
<div class="source">
<p class="source-text"></p>
+ <p id="source-text-tmp-space" style="display:none"></p>
</div>
<div class="translation">
<form method="post" action="<?= url::site("l10n_client/save") ?>" id="gL10nClientSaveForm">