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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<div class="Widget" id="$ClassName"> <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"> <div class="widgetDescription">
<p>$Description</p> <p>$Description</p>
</div> </div>

View File

@ -10,5 +10,5 @@
<% end_if %> <% end_if %>
<input type="hidden" name="$Name[Type]" value="$ClassName" /> <input type="hidden" name="$Name[Type]" value="$ClassName" />
<input type="hidden" name="$Name[Sort]" value="$Sort" /> <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> </div>