Transifex translation support

This commit is contained in:
Ingo Schommer 2013-07-08 12:28:02 +02:00
parent 368d2d4045
commit c971289104
9 changed files with 41 additions and 19 deletions

8
.tx/config Normal file
View File

@ -0,0 +1,8 @@
[main]
host = https://www.transifex.com
[silverstripe-widgets.master]
file_filter = lang/<lang>.yml
source_file = lang/en.yml
source_lang = en
type = YML

View File

@ -294,3 +294,17 @@ Page class). One way to fix this is to comment out line 30 in BlogHolder.php and
Then you can use the Widget area you defined on Page.php
## Contributing
### Translations
Translations of the natural language strings are managed through a
third party translation interface, transifex.com.
Newly added strings will be periodically uploaded there for translation,
and any new translations will be merged back to the project source code.
Please use [https://www.transifex.com/projects/p/silverstripe-widgets/](https://www.transifex.com/projects/p/silverstripe-widgets/) to contribute translations,
rather than sending pull requests with YAML files.
See the ["i18n" topic](http://doc.silverstripe.org/framework/en/trunk/topics/i18n) on doc.silverstripe.org for more details.

View File

@ -1,13 +1,13 @@
de:
WidgetAreaEditor.ss:
WidgetAreaEditor_ss:
AVAILABLE: "Vorhandene Widgets"
AVAILWIDGETS: "Klicke den Widget Titel, um es zu benutzen."
NOAVAIL: "Es sind derzeit keine Widgets verfügbar."
INUSE: "Benutzte Widgets"
TOSORT: "Um die Widgets auf dieser Seite zu sortieren, ziehe sie nach oben oder unten."
WidgetEditor.ss:
WidgetEditor_ss:
DELETE: "Löschen"
WidgetDescription.ss:
WidgetDescription_ss:
CLICKTOADDWIDGET: "Klicke um dieses Widget hinzuzufügen"
WidgetArea:
PLURALNAME: "Widgetbereiche"

View File

@ -1,13 +1,13 @@
en:
WidgetAreaEditor.ss:
WidgetAreaEditor_ss:
AVAILABLE: "Available Widgets"
AVAILWIDGETS: "Click a widget title below to use it on this page."
NOAVAIL: "There are currently no widgets available."
INUSE: "Widgets currently used"
TOSORT: "To sort currently used widgets on this page, drag them up and down."
WidgetEditor.ss:
WidgetEditor_ss:
DELETE: "Delete"
WidgetDescription.ss:
WidgetDescription_ss:
CLICKTOADDWIDGET: "Click to add this widget"
WidgetArea:
PLURALNAME: "Widget areas"

View File

@ -1,13 +1,13 @@
nl:
WidgetAreaEditor.ss:
WidgetAreaEditor_ss:
AVAILABLE: "Beschikbare Widgets"
AVAILWIDGETS: "Klik op een widget titel hieronder, om de widget te gebruiken op deze pagina."
NOAVAIL: "Er zijn geen widgets beschikbaar."
INUSE: "Huidige gebruikte Widgets"
TOSORT: "Om uw widgets te sorteren op deze pagina, rangschik met drag & drop."
WidgetEditor.ss:
WidgetEditor_ss:
DELETE: "Verwijderen"
WidgetDescription.ss:
WidgetDescription_ss:
CLICKTOADDWIDGET: "Klik om deze widget toe te voegen"
WidgetArea:
PLURALNAME: "Widget plaatsen"

View File

@ -1,13 +1,13 @@
sv:
WidgetAreaEditor.ss:
WidgetAreaEditor_ss:
AVAILABLE: "Tillgängliga widgets"
AVAILWIDGETS: "Klicka på en widget nedan för att använda den på sidan."
NOAVAIL: "Inga widgets tillängliga."
INUSE: "Använda widgets"
TOSORT: "För att sortera widgetar på denna sida, dra dem uppåt eller nedåt."
WidgetEditor.ss:
WidgetEditor_ss:
DELETE: "Radera"
WidgetDescription.ss:
WidgetDescription_ss:
CLICKTOADDWIDGET: "Klicka för att lägga till denna widget"
WidgetArea:
PLURALNAME: "Widget Areas"

View File

@ -1,8 +1,8 @@
<div class="WidgetAreaEditor field" id="WidgetAreaEditor-$Name" name="$Name"<% if MaxWidgets %> maxwidgets="$MaxWidgets"<% end_if %>>
<input type="hidden" id="$Name" name="$IdxField" value="$Value" />
<div class="availableWidgetsHolder">
<h2><% _t('AVAILABLE', 'Available Widgets') %></h2>
<p class="message"><% _t('AVAILWIDGETS', 'Click a widget title below to use it on this page.') %></p>
<h2><% _t('WidgetAreaEditor_ss.AVAILABLE', 'Available Widgets') %></h2>
<p class="message"><% _t('WidgetAreaEditor_ss.AVAILWIDGETS', 'Click a widget title below to use it on this page.') %></p>
<div class="availableWidgets" id="availableWidgets-$Name">
<% if AvailableWidgets %>
<% loop AvailableWidgets %>
@ -10,14 +10,14 @@
<% end_loop %>
<% else %>
<div class="NoWidgets" id="NoWidgets-$Name">
<p><% _t('NOAVAIL', 'There are currently no widgets available.') %></p>
<p><% _t('WidgetAreaEditor_ss.NOAVAIL', 'There are currently no widgets available.') %></p>
</div>
<% end_if %>
</div>
</div>
<div class="usedWidgetsHolder">
<h2><% _t('INUSE', 'Widgets currently used') %></h2>
<p class="message"><% _t('TOSORT', 'To sort currently used widgets on this page, drag them up and down.') %></p>
<h2><% _t('WidgetAreaEditor_ss.INUSE', 'Widgets currently used') %></h2>
<p class="message"><% _t('WidgetAreaEditor_ss.TOSORT', 'To sort currently used widgets on this page, drag them up and down.') %></p>
<div class="usedWidgets" id="usedWidgets-$Name">
<% if UsedWidgets %>

View File

@ -1,5 +1,5 @@
<div class="Widget" id="$ClassName">
<h3 title="<% _t('CLICKTOADDWIDGET', 'Click to add this widget') %>">$CMSTitle</h3>
<h3 title="<% _t('WidgetDescription_ss.CLICKTOADDWIDGET', 'Click to add this widget') %>">$CMSTitle</h3>
<div class="widgetDescription">
<p>$Description</p>
</div>

View File

@ -10,5 +10,5 @@
<% end_if %>
<input type="hidden" name="$Name[Type]" value="$ClassName" />
<input type="hidden" name="$Name[Sort]" value="$Sort" />
<p class="deleteWidget"><span class="widgetDelete ss-ui-button"><% _t('DELETE', 'Delete') %></span></p>
<p class="deleteWidget"><span class="widgetDelete ss-ui-button"><% _t('WidgetEditor_ss.DELETE', 'Delete') %></span></p>
</div>