update ember-i18n

This commit is contained in:
jelhan 2015-11-20 02:18:19 +01:00
parent 9bf19de533
commit c1dfa16eed
34 changed files with 516 additions and 487 deletions

View file

@ -0,0 +1,18 @@
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'select',
classNames: [ 'language-select' ],
i18n: Ember.inject.service(),
current: Ember.computed.readOnly('i18n.locale'),
locales: Ember.computed('i18n.locales', function() {
return this.get('i18n.locales').map(function (locale) {
return { id: locale, text: locale };
});
}),
change() {
this.get('i18n').set('locale', this.$().val());
}
});

View file

@ -1,16 +1,18 @@
import Ember from "ember"; import Ember from "ember";
/* global moment */
export default Ember.Controller.extend({
i18n: Ember.inject.service(),
export default Ember.Controller.extend({
languageChanged: function() { languageChanged: function() {
// change language // change language
var language = this.get('language.selected'); var language = this.get('i18n.locale');
// save language in cookie // save language in cookie
document.cookie="language=" + language + ";" + document.cookie="language=" + language + ";" +
// give cookie a lifetime of one year // give cookie a lifetime of one year
"max-age=" + 60*60*24*356 + ";"; "max-age=" + 60*60*24*356 + ";";
// rerender page moment.locale(language);
window.location.reload(false); }.observes('i18n.locale')
}.observes('language.selected')
}); });

View file

@ -24,7 +24,7 @@ var OptionsDateTimesObjectValidations = buildValidations({
return value.get('length') >= 1; return value.get('length') >= 1;
}, { }, {
dependentKeys: ['times.[]'], dependentKeys: ['times.[]'],
message: Ember.I18n.t('create.options-datetime.error.notEnoughTimes') // message: Ember.I18n.t('create.options-datetime.error.notEnoughTimes')
}) })
] ]
}); });
@ -62,7 +62,7 @@ var OptionsDateTimesTimeObjectValidations = buildValidations({
return options.message; return options.message;
} }
}, { }, {
message: Ember.I18n.t('create.options-datetime.error.correctTimeFormat') // message: Ember.I18n.t('create.options-datetime.error.correctTimeFormat')
} }
) )
}); });

View file

@ -13,6 +13,14 @@ var Validations = buildValidations({
] ]
}); });
var TranslateableObject = Ember.Object.extend({
i18n: Ember.inject.service(),
label: Ember.computed('labelTranslation', function() {
return this.get('i18n').t(this.get('labelTranslation'));
}),
labelTranslation: undefined
});
export default Ember.Controller.extend(Validations, { export default Ember.Controller.extend(Validations, {
actions: { actions: {
submit: function() { submit: function() {
@ -20,17 +28,23 @@ export default Ember.Controller.extend(Validations, {
} }
}, },
i18n: Ember.inject.service(),
pollType: Ember.computed.alias('model.pollType'), pollType: Ember.computed.alias('model.pollType'),
pollTypes: function(){ pollTypes: function(){
var container = this.get('container');
return [ return [
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id : "FindADate", id : "FindADate",
labelTranslation : "pollTypes.findADate.label" labelTranslation : "pollTypes.findADate.label",
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id : "MakeAPoll", id : "MakeAPoll",
labelTranslation : "pollTypes.makeAPoll.label" labelTranslation : "pollTypes.makeAPoll.label",
container
}) })
]; ];
}.property() }.property()

View file

@ -23,7 +23,7 @@ var Validations = buildValidations({
return 2; return 2;
} }
}, },
message: Ember.I18n.t('create.options.error.notEnoughOptions') // message: Ember.I18n.t('create.options.error.notEnoughOptions')
}), }),
validator('valid-collection', { validator('valid-collection', {
active() { active() {
@ -52,13 +52,14 @@ var Validations = buildValidations({
return 2; return 2;
} }
}, },
message: Ember.I18n.t('create.options.error.notEnoughDates') // message: Ember.I18n.t('create.options.error.notEnoughDates')
}) })
] ]
}); });
export default Ember.Controller.extend(Validations, { export default Ember.Controller.extend(Validations, {
needs: 'create', needs: 'create',
i18n: Ember.inject.service(),
isFindADate: Ember.computed.readOnly('model.isFindADate'), isFindADate: Ember.computed.readOnly('model.isFindADate'),
isMakeAPoll: Ember.computed.readOnly('model.isMakeAPoll'), isMakeAPoll: Ember.computed.readOnly('model.isMakeAPoll'),

View file

@ -16,6 +16,14 @@ var Validations = buildValidations({
forceAnswer: validator('presence', true) forceAnswer: validator('presence', true)
}); });
var TranslateableObject = Ember.Object.extend({
i18n: Ember.inject.service(),
label: Ember.computed('labelTranslation', function() {
return this.get('i18n').t(this.get('labelTranslation'));
}),
labelTranslation: undefined
});
export default Ember.Controller.extend(Validations, { export default Ember.Controller.extend(Validations, {
actions: { actions: {
submit: function(){ submit: function(){
@ -34,8 +42,10 @@ export default Ember.Controller.extend(Validations, {
answerType: Ember.computed.alias('model.answerType'), answerType: Ember.computed.alias('model.answerType'),
answerTypes: function() { answerTypes: function() {
var container = this.get('container');
return [ return [
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id : "YesNo", id : "YesNo",
labelTranslation : "answerTypes.yesNo.label", labelTranslation : "answerTypes.yesNo.label",
answers : [ answers : [
@ -49,9 +59,10 @@ export default Ember.Controller.extend(Validations, {
labelTranslation: "answerTypes.no.label", labelTranslation: "answerTypes.no.label",
icon: "glyphicon glyphicon-thumbs-down" icon: "glyphicon glyphicon-thumbs-down"
}) })
] ],
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id : "YesNoMaybe", id : "YesNoMaybe",
labelTranslation : "answerTypes.yesNoMaybe.label", labelTranslation : "answerTypes.yesNoMaybe.label",
answers : [ answers : [
@ -70,12 +81,14 @@ export default Ember.Controller.extend(Validations, {
labelTranslation: "answerTypes.no.label", labelTranslation: "answerTypes.no.label",
icon: "glyphicon glyphicon-thumbs-down" icon: "glyphicon glyphicon-thumbs-down"
}) })
] ],
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id : "FreeText", id : "FreeText",
labelTranslation : "answerTypes.freeText.label", labelTranslation : "answerTypes.freeText.label",
answers : [] answers : [],
container
}) })
]; ];
}.property(), }.property(),
@ -83,30 +96,38 @@ export default Ember.Controller.extend(Validations, {
expirationDuration: 'P3M', expirationDuration: 'P3M',
expirationDurations: function() { expirationDurations: function() {
var container = this.get('container');
return [ return [
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id: 'P7D', id: 'P7D',
labelTranslation: 'create.settings.expirationDurations.P7D' labelTranslation: 'create.settings.expirationDurations.P7D',
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id: 'P1M', id: 'P1M',
labelTranslation: 'create.settings.expirationDurations.P1M' labelTranslation: 'create.settings.expirationDurations.P1M',
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id: 'P3M', id: 'P3M',
labelTranslation: 'create.settings.expirationDurations.P3M' labelTranslation: 'create.settings.expirationDurations.P3M',
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id: 'P6M', id: 'P6M',
labelTranslation: 'create.settings.expirationDurations.P6M' labelTranslation: 'create.settings.expirationDurations.P6M',
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id: 'P1Y', id: 'P1Y',
labelTranslation: 'create.settings.expirationDurations.P1Y' labelTranslation: 'create.settings.expirationDurations.P1Y',
container
}), }),
Ember.Object.extend(Ember.I18n.TranslateableProperties, {}).create({ TranslateableObject.create({
id: '', id: '',
labelTranslation: 'create.settings.expirationDurations.never' labelTranslation: 'create.settings.expirationDurations.never',
container
}) })
]; ];
}.property(), }.property(),

View file

@ -113,6 +113,7 @@ export default Ember.Controller.extend(Validations, {
anonymousUser: Ember.computed.readOnly('pollController.model.anonymousUser'), anonymousUser: Ember.computed.readOnly('pollController.model.anonymousUser'),
encryption: Ember.inject.service(), encryption: Ember.inject.service(),
forceAnswer: Ember.computed.readOnly('pollController.model.forceAnswer'), forceAnswer: Ember.computed.readOnly('pollController.model.forceAnswer'),
i18n: Ember.inject.service(),
isDateTime: Ember.computed.readOnly('pollController.model.isDateTime'), isDateTime: Ember.computed.readOnly('pollController.model.isDateTime'),
isFreeText: Ember.computed.readOnly('pollController.model.isFreeText'), isFreeText: Ember.computed.readOnly('pollController.model.isFreeText'),
isFindADate: Ember.computed.readOnly('pollController.model.isFindADate'), isFindADate: Ember.computed.readOnly('pollController.model.isFindADate'),
@ -126,7 +127,7 @@ export default Ember.Controller.extend(Validations, {
var label; var label;
if (!Ember.isEmpty(answer.get('labelTranslation'))) { if (!Ember.isEmpty(answer.get('labelTranslation'))) {
label = Ember.I18n.t(answer.get('labelTranslation')); label = this.get('i18n').t(answer.get('labelTranslation'));
} else { } else {
label = answer.get('label'); label = answer.get('label');
} }

View file

@ -1,45 +0,0 @@
import Ember from "ember";
import translations from "croodle/lang/translations";
import moment from "moment";
export default {
name: 'i18n',
initialize: function(container, application) {
// detect browser language
var language = '';
// have a look if it's already stored in a cookie
var cookie = document.cookie.replace(" ", "").split(";");
cookie.forEach(function(t){
var x = t.split("=");
if (x[0] === "language") {
language = x[1];
}
});
// if not we do it by browser language
if (language === '') {
language = (window.navigator.userLanguage || window.navigator.language).split("-")[0];
}
// check if language is supported
if(typeof translations[language] !== "object") {
language = "en";
}
Ember.FEATURES.I18N_TRANSLATE_HELPER_SPAN = false;
Ember.ENV.I18N_COMPILE_WITHOUT_HANDLEBARS = true;
Ember.I18n.translations = Ember.copy(translations[language]);
Ember.I18n.locale = language;
// inject into controller
var languageStorage = Ember.Object.extend({
selected: language
});
container.register('language:current', languageStorage, {singleton: true});
application.inject('controller', 'language', 'language:current');
// set moment locale
moment.locale( language );
}
};

View file

@ -0,0 +1,52 @@
import moment from "moment";
export default {
name: 'i18n',
initialize: function({ container }) {
var i18n = container.lookup('service:i18n'),
availableLocales = i18n.get('locales'),
locale = getLocale(availableLocales);
i18n.set('locale', locale);
moment.locale( locale );
}
};
function getLocale(availableLocales) {
var methods = [
getLocaleByBrowser,
getLocaleFromCookie
];
var locale;
methods.any((method) => {
var l = method();
if (l && availableLocales.indexOf(l) !== -1) {
locale = l;
return true;
}
});
if (locale) {
return locale;
} else {
return 'en';
}
}
function getLocaleByBrowser() {
return (window.navigator.userLanguage || window.navigator.language).split("-")[0];
}
function getLocaleFromCookie() {
var language;
var cookie = document.cookie.replace(" ", "").split(";");
cookie.forEach(function(t){
var x = t.split("=");
if (x[0] === "language") {
language = x[1];
}
});
return language;
}

View file

@ -1,326 +0,0 @@
export default {
"en": {
"answerTypes.yes.label": "Yes",
"answerTypes.no.label": "No",
"answerTypes.maybe.label": "Maybe",
"answerTypes.freeText.label": "Allow free text",
"answerTypes.yesNo.label": "Yes, No",
"answerTypes.yesNoMaybe.label": "Yes, No, Maybe",
"create.index.input.pollType.label": "What is the purpose of your poll?",
"create.meta.input.title.label": "Title",
"create.meta.input.title.placeholder": "Add a poll title.",
"create.meta.input.description.label": "Description",
"create.meta.input.description.placeholder": "Optional: Add a description to the poll.",
"create.next": "Next",
"create.options.button.add.label": "add another option after this one",
"create.options.button.delete.label": "delete this option",
"create.options.options.label": "Answer options",
"create.options.error.notEnoughDates": "You have to choose either two days or one day plus the option 'set times'.",
"create.options.error.notEnoughOptions": "Enter at least two answer options.",
"create.options.defineTimes.label": "Set times?",
"create.options.input.moreOptions.label": "Add further answer options",
"create.options-datetime.datetimes.label": "Times",
"create.options-datetime.more-inputs": "Add further times",
"create.options-datetime.copy-first-line": "Adopt times of the first line for all others",
"create.options-datetime.error.notEnoughTimes": "At least one valid time has to be set per day. If only one day was chosen, at least two times have to be set.",
"create.options-datetime.error.correctTimeFormat": "Hours and minutes of the time have to be separated by a colon (e.g. 13:00).",
"create.settings.answerType.label": "Which answers should be available?",
"create.settings.anonymousUser.label": "Allow anonymous participation in the poll?",
"create.settings.expirationDate.label": "When should the poll expire and be deleted?",
"create.settings.expirationDurations.P7D": "a week from today",
"create.settings.expirationDurations.P1M": "a month from today",
"create.settings.expirationDurations.P3M": "three month from today",
"create.settings.expirationDurations.P6M": "six month from today",
"create.settings.expirationDurations.P1Y": "a year from today",
"create.settings.expirationDurations.never": "never",
"create.settings.forceAnswer.label": "Force answer for every option?",
"create.save": "Save",
"errors.inclusion": "is not part of the list",
"errors.exclusion": "reserved",
"errors.invalid": "invalid",
"errors.confirmation": "does not accord with {{attribute}}",
"errors.accepted": "has to be accepted",
"errors.empty": "cannot be left blank",
"errors.blank": "Must be filled in.",
"errors.present": "Has to be left blank.",
"errors.tooLong": "is too long (Maximum are {{count}} characters)",
"errors.tooShort": "Please insert at least {{count}} characters.",
"errors.wrongLength": "has invalid length (Minimum length {{count}} characters)",
"errors.notANumber": "is not a number",
"errors.notAnInteger": "Has to be a whole number.",
"errors.greaterThan": "has to be bigger than {{count}}",
"errors.greaterThanOrEqualTo": "must be bigger or same as {{count}}",
"errors.equalTo": "must equal {{count}}",
"errors.lessThan": "must be smaller than {{count}}",
"errors.lessThanOrEqualTo": "must be smaller or equal to {{count}}",
"errors.otherThan": "must be a different number than {{count}}",
"errors.odd": "must be unequal to",
"errors.even": "must be equal to",
"errors.url": "is not a valid URL",
"index.title": "Croodle simplifies making appointments and finding decisions ...<br/>... and at the same time protects your data",
"index.features.title": "Functions",
"index.features.list.overview": "<strong>Find a date</strong> or <strong>do a poll</strong> with as many people as you like.",
"index.features.list.privacy": "Your data stays private: Already in your browser they are being <strong>encrypted</strong>. Only the people who you send the link of the poll to will know what your poll is about.",
"index.features.list.options": "You can set as many <strong>answer options</strong> as you like. You can choose your <strong>preferred date</strong> or compile <strong>any questions</strong>",
"index.features.list.answers": "you can use <strong>pre-defined answer options</strong> like <i>yes</i>, <i>no</i>, <i>maybe</i> or allow <strong>own questions</strong>.",
"index.features.list.evaluation": "You keep the overview through <strong>overview of preferred answers</strong>.",
"index.link.have-a-try": "test it now",
"index.hoster.title": "Host your own Croodle:",
"index.hoster.text": "You dont have to trust this Croodle. Croodle is a free software and you can install it on your own server. You only a few megabytes memory capacity, PHP and SSL-encryption. You can find the software and tips for installation here <a href=\"https://github.com/jelhan/croodle\">GitHub</a>.",
"modal.save-retry.title": "Save failed",
"modal.save-retry.text": "<p>Your membership could not be saved. Please check your Internet connection and try it again.</p><p>If this does not help, a short-term failure of the server could be the problem. Please wait a few minutes before trying again. You can leave as long as the page opens.</p><p>If problem persists, please contact contact administrators of the page.</p>",
"modal.save-retry.button-retry": "Retry",
"poll.created-time": "Created on {{creationDate}}.",
"poll.error.newUser.everyOptionIsAnswered": "Please answer ever option.",
"poll.error.newUserName": "You have to give a user name.",
"poll.evaluation.label": "Evaluation",
"poll.evaluation.bestOption.label.findADate.one": "The preferred date is",
"poll.evaluation.bestOption.label.findADate.other": "The preferred dates are",
"poll.evaluation.bestOption.label.makeAPoll.one": "The preferred choice is",
"poll.evaluation.bestOption.label.makeAPoll.other": "The preferred choices are",
"poll.evaluation.bestOptionParticipants.findADate.yes.one": "One person is available.",
"poll.evaluation.bestOptionParticipants.findADate.yes.other": "{{count}} persons are available.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.one": "One person is maybe available.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.other": "{{count}} are maybe available.",
"poll.evaluation.bestOptionParticipants.findADate.no.one": "One person is unavailable.",
"poll.evaluation.bestOptionParticipants.findADate.no.other": "{{count}} persons are unavailable.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.one": "One person ticks this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.other": "{{count}} persons tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.one": "One person will maybe tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.other": "{{count}} persons will maybe tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.one": "One person won't tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.other": "{{count}} persons won't tick this choice.",
"poll.evaluation.lastParticipation": "The last one participated {{ago}}.",
"poll.evaluation.participants.one": "One person had participated in the poll.",
"poll.evaluation.participants.other": "{{count}} persons have participated in the poll.",
"poll.input.newUserName.label": "Name",
"poll.input.newUserName.placeholder": "Your name",
"poll.modal.timezoneDiffers.title": "Which time zone should be used to display the data?",
"poll.modal.timezoneDiffers.body": "The poll has been set up for a time zone that differs from your local time. Which time zone should be used to display the data?",
"poll.modal.timezoneDiffers.button.useLocalTimezone": "my time zones",
"poll.modal.timezoneDiffers.button.usePollTimezone": "Original time zone",
"poll.save": "Save",
"poll.share": "Share the link and invite others to the poll.",
"poll.share.notice": "Anyone who knows the link can see your poll. If this contains private data, you should only pass on this link via encrypted e-mail or chat with end-to-end-encryption.",
"poll.input.showEvaluation.hide": "Hide",
"poll.input.showEvaluation.show": "Show",
"pollTypes.findADate.label": "I would like to make a date. (e.g. date or time for appointment)",
"pollTypes.makeAPoll.label": "I would like to answer a question. (e.g. what goes best with coffee?)",
},
"de": {
"answerTypes.yes.label": "Ja",
"answerTypes.no.label": "Nein",
"answerTypes.maybe.label": "Vielleicht",
"answerTypes.freeText.label": "Freitext erlauben",
"answerTypes.yesNo.label": "Ja, Nein",
"answerTypes.yesNoMaybe.label": "Ja, Nein, Vielleicht",
"create.index.input.pollType.label": "Was ist der Zweck deiner Umfrage?",
"create.meta.input.title.label": "Titel",
"create.meta.input.title.placeholder": "Füge einen Umfragetitel hinzu.",
"create.meta.input.description.label": "Beschreibung",
"create.meta.input.description.placeholder": "Optional: Füge der Umfrage eine Beschreibung hinzu.",
"create.next": "Weiter",
"create.options.button.add.label": "Weitere Option nach dieser hinzufügen",
"create.options.button.delete.label": "Diese Option löschen",
"create.options.options.label": "Antwort-Optionen",
"create.options.error.notEnoughDates": "Es müssen entweder zwei Tage ausgewählt, oder ein Tag und die Option 'Uhrzeiten festlegen' gewählt werden.",
"create.options.error.notEnoughOptions": "Es müssen mindestens zwei Antwort-Optionen eingetragen werden.",
"create.options.defineTimes.label": "Uhrzeiten festlegen?",
"create.options.input.moreOptions.label": "weitere Antwort-Optionen hinzufügen",
"create.options-datetime.datetimes.label": "Uhrzeiten",
"create.options-datetime.more-inputs": "Weitere Uhrzeiten eingeben",
"create.options-datetime.copy-first-line": "Uhrzeiten der ersten Zeile für alle anderen übernehmen",
"create.options-datetime.error.notEnoughTimes": "Es muss mindestens eine gültige Uhrzeit pro Tag festgelegt werden. Falls nur ein einziger Tag ausgewählt wurde, müssen mindestens 2 Uhrzeiten festgelegt werden.",
"create.options-datetime.error.correctTimeFormat": "Uhrzeiten müssen als Stunden und Minuten getrennt durch einen Doppelpunkt eingegeben werden (z.B. 13:00).",
"create.settings.answerType.label": "Welche Antworten sollen verfügbar sein?",
"create.settings.anonymousUser.label": "Anonyme Teilnahme an der Umfrage erlauben?",
"create.settings.expirationDate.label": "Wann soll Ihre Umfrage verfallen und gelöscht werden?",
"create.settings.expirationDurations.P7D": "in einer Woche",
"create.settings.expirationDurations.P1M": "in einem Monat",
"create.settings.expirationDurations.P3M": "in drei Monaten",
"create.settings.expirationDurations.P6M": "in einem halben Jahr",
"create.settings.expirationDurations.P1Y": "in einem Jahr",
"create.settings.expirationDurations.never": "niemals",
"create.settings.forceAnswer.label": "Eine Antwort für jede Option erzwingen?",
"create.save": "Speichern",
"errors.inclusion": "ist kein Bestandteil der Liste",
"errors.exclusion": "reserviert",
"errors.invalid": "ungültig",
"errors.confirmation": "stimmt nicht mit {{attribute}} überein",
"errors.accepted": "muss akzeptiert werden",
"errors.empty": "darf nicht freigelassen sein",
"errors.blank": "Muss ausgefüllt werden.",
"errors.present": "Muss frei bleiben.",
"errors.tooLong": "ist zu lang (Maximum sind {{count}} Zeichen)",
"errors.tooShort": "Bitte gebe mindestens {{count}} Zeichen ein.",
"errors.wrongLength": "hat die falsche Länge (Mindestlänge {{count}} Zeichen)",
"errors.notANumber": "ist keine Zahl",
"errors.notAnInteger": "Muss eine ganze Zahl sein.",
"errors.greaterThan": "muss größer als {{count}} sein",
"errors.greaterThanOrEqualTo": "muss größer oder gleich {{count}} sein",
"errors.equalTo": "muss gleich {{count}} sein",
"errors.lessThan": "muss kleiner als {{count}} sein",
"errors.lessThanOrEqualTo": "muss kleiner oder gleich {{count}} sein",
"errors.otherThan": "muss einen anderen Wert als {{count}} haben",
"errors.odd": "muss ungleich sein",
"errors.even": "muss gleich sein",
"errors.url": "ist keine gültige URL",
"index.title": "Croodle vereinfacht die Termin- und Entscheidungsfindung ...<br/>... und schützt dabei deine Daten",
"index.features.title": "Funktionen",
"index.features.list.overview": "<strong>Finde einen Termin</strong> oder <strong>mache eine Umfrage</strong> mit so vielen Leuten, wie du möchtest.",
"index.features.list.privacy": "Deine Daten bleiben privat: Sie werden bereits in deinem Browser <strong>verschlüsselt</strong>. Worum es in deiner Umfrage geht, wissen nur die Personen, denen du den Umfrage-Link sendest.",
"index.features.list.options": "Du kannst so viele <strong>Antwortmöglichkeiten</strong> festlegen, wie du möchtest. Du kannst deinen Wunschtermin im <strong>Kalender</strong> auswählen, oder <strong>beliebige Fragen</strong> erstellen.",
"index.features.list.answers": "Du kannst <strong>vordefinierte Anwortmöglichkeiten</strong> nutzen, wie zum Beispiel <i>ja</i>, <i>nein</i>, <i>vielleicht</i> oder <strong>selbsterstellte Antworten</strong> erlauben.",
"index.features.list.evaluation": "Du behälst den Überblick durch eine automatisch aktualisierte <strong>Übersicht der bevorzugten Antworten</strong>.",
"index.link.have-a-try": "probiere es jetzt aus",
"index.hoster.title": "Hoste dein eigenes Croodle:",
"index.hoster.text": "Du musst diesem Croodle nicht vertrauen. Croodle ist freie Software und kannst sie auf deinem eigenen Server installieren. Hierzu werden lediglich einige Megabyte Speicherplatz, PHP und SSL-Verschlüsselung benötigt. Die Software und Tipps zur Installation findest du auf <a href=\"https://github.com/jelhan/croodle\">GitHub</a>.",
"modal.save-retry.title": "Speichern fehlgeschlagen.",
"modal.save-retry.text": "<p>Deine Teilnahme konnte nicht gespeichert werden. Bitte prüfe deine Internetverbindung und versuche es anschließend erneut.</p><p>Sollte dies nicht helfen, kann ein kurzfristiges Ausfall des Servers schuld sein. Warte bitte einige Minuten bevor du es erneut versuchst. Du kannst die Seite so lange geöffnet lassen.</p><p>Sollten die Probleme anhalten, wende dich bitte an die Administratoren der Seite.</p>",
"modal.save-retry.button-retry": "erneut versuchen",
"poll.created-time": "Erstellt am {{creationDate}}.",
"poll.error.newUser.everyOptionIsAnswered": "Bitte beantworte jede Option.",
"poll.error.newUserName": "Du musst einen Nutzernamen angeben.",
"poll.evaluation.label": "Auswertung",
"poll.evaluation.bestOption.label.findADate.one": "Der bevorzugte Termin ist",
"poll.evaluation.bestOption.label.findADate.other": "Die bevorzugten Termine sind",
"poll.evaluation.bestOption.label.makeAPoll.one": "Die bevorzugte Option ist",
"poll.evaluation.bestOption.label.makeAPoll.other": "Die bevorzugten Optionen sind",
"poll.evaluation.bestOptionParticipants.findADate.yes.one": "Eine Person hat Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.yes.other": "{{count}} Personen haben Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.one": "Eine Person hat vielleicht Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.other": "{{count}} Personen haben vielleicht Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.no.one": "Eine Person hat keine Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.no.other": "{{count}} Personen haben keine Zeit.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.one": "Einer Person gefällt diese Option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.other": "{{count}} Personen gefällt diese Option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.one": "Einer Person gefällt diese Option vielleicht.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.other": "{{count}} Personen gefällt diese Option vielleicht.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.one": "Einer Person gefällt diese Option nicht.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.other": "{{count}} Personen gefällt diese Option nicht.",
"poll.evaluation.lastParticipation": "Die letzte Person hat {{ago}} teilgenommen.",
"poll.evaluation.participants.one": "Eine Person hat sich an der Umfrage beteiligt.",
"poll.evaluation.participants.other": "{{count}} Personen haben sich an der Umfrage beteiligt.",
"poll.input.newUserName.label": "Name",
"poll.input.newUserName.placeholder": "Dein Name",
"poll.modal.timezoneDiffers.title": "In welcher Zeitzone sollen die Daten angezeigt werden?",
"poll.modal.timezoneDiffers.body": "Die Umfrage wurde für eine Zeitzone angelegt, die von deiner lokalen Zeit abweicht. In welcher Zeitzone sollen die Daten angezeigt werden?",
"poll.modal.timezoneDiffers.button.useLocalTimezone": "meine Zeitzone",
"poll.modal.timezoneDiffers.button.usePollTimezone": "Original-Zeitzone",
"poll.save": "Speichern",
"poll.share": "Teile den Link und lade Andere zu deiner Umfrage ein.",
"poll.share.notice": "Jeder der den Link kennt, kann deine Umfrage ansehen. Falls diese private Daten enthält, solltest du den Link nur per verschlüsselter Mail oder Chat mit End-to-End-Verschlüsselung weitergeben.",
"poll.input.showEvaluation.hide": "Verbergen",
"poll.input.showEvaluation.show": "Anzeigen",
"pollTypes.findADate.label": "Ich möchte einen Termin finden. (z.B. Datum oder Uhrzeit für eine Verabredung)",
"pollTypes.makeAPoll.label": "Ich möchte eine Frage beantworten. (z.B. Wozu schmeckt Kaffe am Besten?)",
},
"es": {
"answerTypes.yes.label": "Si",
"answerTypes.no.label": "No",
"answerTypes.maybe.label": "Quizás",
"answerTypes.freeText.label": "Permitir escribir texto libremente",
"answerTypes.yesNo.label": "Si, No",
"answerTypes.yesNoMaybe.label": "Si, No, Quizás",
"create.index.input.pollType.label": "¿Que tipo de encuesta quieres hacer?",
"create.meta.input.title.label": "Título",
"create.meta.input.title.placeholder": "Añde el título de la encuesta.",
"create.meta.input.description.label": "Descripción",
"create.meta.input.description.placeholder": "Opcional: Añade una descripción a la encuesta.",
"create.next": "Siguiente",
"create.options.button.add.label": "add another option after this one",
"create.options.button.delete.label": "delete this option",
"create.options.options.label": "Opciones de respuesta",
"create.options.error.notEnoughDates": "Tienes que elegir almenos dos días o un único día con la opción 'establecer horarios'.",
"create.options.error.notEnoughOptions": "Introduce almenos dos opciones para la respuesta.",
"create.options.defineTimes.label": "¿Establecer horarios?",
"create.options.input.moreOptions.label": "Añadir más opciones de respuesta",
"create.options-datetime.datetimes.label": "Horarios",
"create.options-datetime.more-inputs": "Añadir más horarios",
"create.options-datetime.copy-first-line": "Utilizar el horario de la primera línea para todas las demás.",
"create.options-datetime.error.notEnoughTimes": "Ha de establecerse almenos un horario correcto para cada día. Si se ha elegido únicamente un día, hay que establecer almenos dos horarios.",
"create.options-datetime.error.correctTimeFormat": "Las horas y minutos del horario deben ser separadas por el caracter dospuntos (p.ej. 13:00).",
"create.settings.answerType.label": "¿Que respuesta debería estar disponible?",
"create.settings.anonymousUser.label": "¿permitir participantes anónimos en la encuesta?",
"create.settings.expirationDate.label": "When should the poll expire and be deleted?",
"create.settings.expirationDurations.P7D": "a week from today",
"create.settings.expirationDurations.P1M": "a month from today",
"create.settings.expirationDurations.P3M": "three month from today",
"create.settings.expirationDurations.P6M": "six month from today",
"create.settings.expirationDurations.P1Y": "a year from today",
"create.settings.expirationDurations.never": "never",
"create.settings.forceAnswer.label": "¿Obligar a responder todas las preguntas/opciones?",
"create.save": "Guardar",
"errors.inclusion": "no es parte de la lista",
"errors.exclusion": "reservado",
"errors.invalid": "invalido",
"errors.confirmation": "no concuerda con {{attribute}}",
"errors.accepted": "tiene que ser aceptado",
"errors.empty": "no puede dejarse vacío",
"errors.blank": "Debe rellenarse.",
"errors.present": "Debe dejarse vacío",
"errors.tooLong": "Es demasiado largo (el máximo son {{count}} caractéres)",
"errors.tooShort": "Por favor, escribir un mínimo de {{count}} caractéres.",
"errors.wrongLength": "tiene una longitud incorrecta (Un minimo de {{count}} caractéres)",
"errors.notANumber": "no es un número",
"errors.notAnInteger": "Tiene que ser un número entero.",
"errors.greaterThan": "tiene que ser mayor que {{count}}",
"errors.greaterThanOrEqualTo": "tiene que ser mayor o igual a {{count}}",
"errors.equalTo": "tiene que ser igual a {{count}}",
"errors.lessThan": "tiene que ser menor que {{count}}",
"errors.lessThanOrEqualTo": "tiene que ser menor o igual a {{count}}",
"errors.otherThan": "tiene que ser un número distinto que {{count}}",
"errors.odd": "tiene que ser distinto que",
"errors.even": "tiene que ser igual que",
"errors.url": "no es una URL valida",
"index.title": "Croodle simplifica las citas y la toma de decisiones ...<br/>... y al mismo tiempo protege tus datos",
"index.features.title": "Funciones",
"index.features.list.overview": "<strong>Encontrar una fecha</strong> o <strong>hacer una encuesta</strong> con la cantidad de personas que quieras.",
"index.features.list.privacy": "Tus datos son privados: Ya desde tu navegador los datos son <strong>encriptados</strong>. ünicamente las personas a las que mandes el enlace directamente sabrán que tu encuesta existe y de que se trata.",
"index.features.list.options": "Puedes incluir tantas <strong>opciones de respuesta</strong> como quieras. Puedes elegir tus <strong>fechas preferidas</strong> o escribir <strong>cualquier pregunta</strong>",
"index.features.list.answers": "Puedes utilizar <sttong>respuestas pre definidas</strong> como <i>si</i>,<i>no</i>, <i>quizás</i> o permitir una <strong>respuesta libre</strong>.",
"index.features.list.evaluation": "Mantendrás el control mediante la <strong>revisión de las respuestas favoritas</strong>.",
"index.link.have-a-try": "pruebalo ahora",
"index.hoster.title": "Instala tu propio Croodle:",
"index.hoster.text": "No tienes porque fiarte de este Croodle. Croodle es software libre y tu puedes instalarlo en tu propio servidor. Sólo unos pocos megas de espacio, PHP y encriptación-SSL. Puesde encontrar el software y ayuda en inglés para la instalación aquí <a href=\"https://github.com/jelhan/croodle\">GitHub</a>.",
"modal.save-retry.title": "Error al guardar",
"modal.save-retry.text": "<p>Tu inscripción no pudo ser guardada. Por favor, comprueba tu conexión a internet e inténtalo de nuevo.</p><p>Si esto no ayuda, podría ser debido a un breve fallo en el servidor. Por favor, espera unos minutos e inténtalo de nuevo. Puedes esperar mientras la página se abre.</p><p>Si los problemas continúan, por favor, contacte al administrador de la página.</p>",
"modal.save-retry.button-retry": "Reintentar",
"poll.created-time": "Creada el {{creationDate}}.",
"poll.error.newUser.everyOptionIsAnswered": "Por favor responde a todas las opciones.",
"poll.error.newUserName": "Tienes que poner un nombre.",
"poll.evaluation.label": "Evaluar",
"poll.evaluation.bestOption.label.findADate.one": "The preferred date is",
"poll.evaluation.bestOption.label.findADate.other": "The preferred dates are",
"poll.evaluation.bestOption.label.makeAPoll.one": "The preferred option is",
"poll.evaluation.bestOption.label.makeAPoll.other": "The preferred options are",
"poll.evaluation.bestOptionParticipants.findADate.yes.one": "One person has time.",
"poll.evaluation.bestOptionParticipants.findADate.yes.other": "{{count}} persons have time.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.one": "One person has maybe time.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.other": "{{count}} have maybe time.",
"poll.evaluation.bestOptionParticipants.findADate.no.one": "One person has no time.",
"poll.evaluation.bestOptionParticipants.findADate.no.other": "{{count}} persons have no time.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.one": "One person likes this option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.other": "{{count}} persons like these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.one": "One person maybe likes these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.other": "{{count}} persons like these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.one": "One person does not like these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.other": "{{count}} persons does not like these options.",
"poll.evaluation.lastParticipation": "The last person has participated {{ago}}.",
"poll.evaluation.participants.one": "One person had participated in the poll.",
"poll.evaluation.participants.other": "{{count}} persons have participated in the poll.",
"poll.input.newUserName.label": "Name",
"poll.input.newUserName.placeholder": "Tu nombre",
"poll.modal.timezoneDiffers.title": "¿Que zona horaria deseas utilizar para mostrar los datos?",
"poll.modal.timezoneDiffers.body": "La encuesta ha sido configurada para una zona horaria distinta de tu hora local. ¿Con qué zona horaria debería mostrarse la información?",
"poll.modal.timezoneDiffers.button.useLocalTimezone": "mi zona horaria",
"poll.modal.timezoneDiffers.button.usePollTimezone": "la zona horaria original",
"poll.save": "Guardar",
"poll.share": "Comparte el enlace e invita a otras personas a la encuesta.",
"poll.share.notice": "Cualquiera que conozca el enlace podrá ver tu encuesta. Si esta contiene información privada deberías compartir el enlace únicamente mediante un correo electrónico encriptado o mediante chat con encriptación de-punto-a-punto.",
"poll.input.showEvaluation.hide": "Esconder",
"poll.input.showEvaluation.show": "Mostrar",
"pollTypes.findADate.label": "Querría crear una fecha (p. ej. fecha para una reunión).",
"pollTypes.makeAPoll.label": "Querría responder a una pregunta (p. ej. ¿con que tomas el café?).",
},
};

View file

@ -0,0 +1,108 @@
export default {
"answerTypes.yes.label": "Ja",
"answerTypes.no.label": "Nein",
"answerTypes.maybe.label": "Vielleicht",
"answerTypes.freeText.label": "Freitext erlauben",
"answerTypes.yesNo.label": "Ja, Nein",
"answerTypes.yesNoMaybe.label": "Ja, Nein, Vielleicht",
"create.index.input.pollType.label": "Was ist der Zweck deiner Umfrage?",
"create.meta.input.title.label": "Titel",
"create.meta.input.title.placeholder": "Füge einen Umfragetitel hinzu.",
"create.meta.input.description.label": "Beschreibung",
"create.meta.input.description.placeholder": "Optional: Füge der Umfrage eine Beschreibung hinzu.",
"create.next": "Weiter",
"create.options.button.add.label": "Weitere Option nach dieser hinzufügen",
"create.options.button.delete.label": "Diese Option löschen",
"create.options.options.label": "Antwort-Optionen",
"create.options.error.notEnoughDates": "Es müssen entweder zwei Tage ausgewählt, oder ein Tag und die Option 'Uhrzeiten festlegen' gewählt werden.",
"create.options.error.notEnoughOptions": "Es müssen mindestens zwei Antwort-Optionen eingetragen werden.",
"create.options.defineTimes.label": "Uhrzeiten festlegen?",
"create.options.input.moreOptions.label": "weitere Antwort-Optionen hinzufügen",
"create.options-datetime.datetimes.label": "Uhrzeiten",
"create.options-datetime.more-inputs": "Weitere Uhrzeiten eingeben",
"create.options-datetime.copy-first-line": "Uhrzeiten der ersten Zeile für alle anderen übernehmen",
"create.options-datetime.error.notEnoughTimes": "Es muss mindestens eine gültige Uhrzeit pro Tag festgelegt werden. Falls nur ein einziger Tag ausgewählt wurde, müssen mindestens 2 Uhrzeiten festgelegt werden.",
"create.options-datetime.error.correctTimeFormat": "Uhrzeiten müssen als Stunden und Minuten getrennt durch einen Doppelpunkt eingegeben werden (z.B. 13:00).",
"create.settings.answerType.label": "Welche Antworten sollen verfügbar sein?",
"create.settings.anonymousUser.label": "Anonyme Teilnahme an der Umfrage erlauben?",
"create.settings.expirationDate.label": "Wann soll Ihre Umfrage verfallen und gelöscht werden?",
"create.settings.expirationDurations.P7D": "in einer Woche",
"create.settings.expirationDurations.P1M": "in einem Monat",
"create.settings.expirationDurations.P3M": "in drei Monaten",
"create.settings.expirationDurations.P6M": "in einem halben Jahr",
"create.settings.expirationDurations.P1Y": "in einem Jahr",
"create.settings.expirationDurations.never": "niemals",
"create.settings.forceAnswer.label": "Eine Antwort für jede Option erzwingen?",
"create.save": "Speichern",
"errors.inclusion": "ist kein Bestandteil der Liste",
"errors.exclusion": "reserviert",
"errors.invalid": "ungültig",
"errors.confirmation": "stimmt nicht mit {{attribute}} überein",
"errors.accepted": "muss akzeptiert werden",
"errors.empty": "darf nicht freigelassen sein",
"errors.blank": "Muss ausgefüllt werden.",
"errors.present": "Muss frei bleiben.",
"errors.tooLong": "ist zu lang (Maximum sind {{count}} Zeichen)",
"errors.tooShort": "Bitte gebe mindestens {{count}} Zeichen ein.",
"errors.wrongLength": "hat die falsche Länge (Mindestlänge {{count}} Zeichen)",
"errors.notANumber": "ist keine Zahl",
"errors.notAnInteger": "Muss eine ganze Zahl sein.",
"errors.greaterThan": "muss größer als {{count}} sein",
"errors.greaterThanOrEqualTo": "muss größer oder gleich {{count}} sein",
"errors.equalTo": "muss gleich {{count}} sein",
"errors.lessThan": "muss kleiner als {{count}} sein",
"errors.lessThanOrEqualTo": "muss kleiner oder gleich {{count}} sein",
"errors.otherThan": "muss einen anderen Wert als {{count}} haben",
"errors.odd": "muss ungleich sein",
"errors.even": "muss gleich sein",
"errors.url": "ist keine gültige URL",
"index.title": "Croodle vereinfacht die Termin- und Entscheidungsfindung ...<br/>... und schützt dabei deine Daten",
"index.features.title": "Funktionen",
"index.features.list.overview": "<strong>Finde einen Termin</strong> oder <strong>mache eine Umfrage</strong> mit so vielen Leuten, wie du möchtest.",
"index.features.list.privacy": "Deine Daten bleiben privat: Sie werden bereits in deinem Browser <strong>verschlüsselt</strong>. Worum es in deiner Umfrage geht, wissen nur die Personen, denen du den Umfrage-Link sendest.",
"index.features.list.options": "Du kannst so viele <strong>Antwortmöglichkeiten</strong> festlegen, wie du möchtest. Du kannst deinen Wunschtermin im <strong>Kalender</strong> auswählen, oder <strong>beliebige Fragen</strong> erstellen.",
"index.features.list.answers": "Du kannst <strong>vordefinierte Anwortmöglichkeiten</strong> nutzen, wie zum Beispiel <i>ja</i>, <i>nein</i>, <i>vielleicht</i> oder <strong>selbsterstellte Antworten</strong> erlauben.",
"index.features.list.evaluation": "Du behälst den Überblick durch eine automatisch aktualisierte <strong>Übersicht der bevorzugten Antworten</strong>.",
"index.link.have-a-try": "probiere es jetzt aus",
"index.hoster.title": "Hoste dein eigenes Croodle:",
"index.hoster.text": "Du musst diesem Croodle nicht vertrauen. Croodle ist freie Software und kannst sie auf deinem eigenen Server installieren. Hierzu werden lediglich einige Megabyte Speicherplatz, PHP und SSL-Verschlüsselung benötigt. Die Software und Tipps zur Installation findest du auf <a href=\"https://github.com/jelhan/croodle\">GitHub</a>.",
"modal.save-retry.title": "Speichern fehlgeschlagen.",
"modal.save-retry.text": "<p>Deine Teilnahme konnte nicht gespeichert werden. Bitte prüfe deine Internetverbindung und versuche es anschließend erneut.</p><p>Sollte dies nicht helfen, kann ein kurzfristiges Ausfall des Servers schuld sein. Warte bitte einige Minuten bevor du es erneut versuchst. Du kannst die Seite so lange geöffnet lassen.</p><p>Sollten die Probleme anhalten, wende dich bitte an die Administratoren der Seite.</p>",
"modal.save-retry.button-retry": "erneut versuchen",
"poll.created-time": "Erstellt am {{creationDate}}.",
"poll.error.newUser.everyOptionIsAnswered": "Bitte beantworte jede Option.",
"poll.error.newUserName": "Du musst einen Nutzernamen angeben.",
"poll.evaluation.label": "Auswertung",
"poll.evaluation.bestOption.label.findADate.one": "Der bevorzugte Termin ist",
"poll.evaluation.bestOption.label.findADate.other": "Die bevorzugten Termine sind",
"poll.evaluation.bestOption.label.makeAPoll.one": "Die bevorzugte Option ist",
"poll.evaluation.bestOption.label.makeAPoll.other": "Die bevorzugten Optionen sind",
"poll.evaluation.bestOptionParticipants.findADate.yes.one": "Eine Person hat Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.yes.other": "{{count}} Personen haben Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.one": "Eine Person hat vielleicht Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.other": "{{count}} Personen haben vielleicht Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.no.one": "Eine Person hat keine Zeit.",
"poll.evaluation.bestOptionParticipants.findADate.no.other": "{{count}} Personen haben keine Zeit.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.one": "Einer Person gefällt diese Option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.other": "{{count}} Personen gefällt diese Option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.one": "Einer Person gefällt diese Option vielleicht.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.other": "{{count}} Personen gefällt diese Option vielleicht.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.one": "Einer Person gefällt diese Option nicht.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.other": "{{count}} Personen gefällt diese Option nicht.",
"poll.evaluation.lastParticipation": "Die letzte Person hat {{ago}} teilgenommen.",
"poll.evaluation.participants.one": "Eine Person hat sich an der Umfrage beteiligt.",
"poll.evaluation.participants.other": "{{count}} Personen haben sich an der Umfrage beteiligt.",
"poll.input.newUserName.label": "Name",
"poll.input.newUserName.placeholder": "Dein Name",
"poll.modal.timezoneDiffers.title": "In welcher Zeitzone sollen die Daten angezeigt werden?",
"poll.modal.timezoneDiffers.body": "Die Umfrage wurde für eine Zeitzone angelegt, die von deiner lokalen Zeit abweicht. In welcher Zeitzone sollen die Daten angezeigt werden?",
"poll.modal.timezoneDiffers.button.useLocalTimezone": "meine Zeitzone",
"poll.modal.timezoneDiffers.button.usePollTimezone": "Original-Zeitzone",
"poll.save": "Speichern",
"poll.share": "Teile den Link und lade Andere zu deiner Umfrage ein.",
"poll.share.notice": "Jeder der den Link kennt, kann deine Umfrage ansehen. Falls diese private Daten enthält, solltest du den Link nur per verschlüsselter Mail oder Chat mit End-to-End-Verschlüsselung weitergeben.",
"poll.input.showEvaluation.hide": "Verbergen",
"poll.input.showEvaluation.show": "Anzeigen",
"pollTypes.findADate.label": "Ich möchte einen Termin finden. (z.B. Datum oder Uhrzeit für eine Verabredung)",
"pollTypes.makeAPoll.label": "Ich möchte eine Frage beantworten. (z.B. Wozu schmeckt Kaffe am Besten?)"
};

View file

@ -0,0 +1,108 @@
export default {
"answerTypes.yes.label": "Yes",
"answerTypes.no.label": "No",
"answerTypes.maybe.label": "Maybe",
"answerTypes.freeText.label": "Allow free text",
"answerTypes.yesNo.label": "Yes, No",
"answerTypes.yesNoMaybe.label": "Yes, No, Maybe",
"create.index.input.pollType.label": "What is the purpose of your poll?",
"create.meta.input.title.label": "Title",
"create.meta.input.title.placeholder": "Add a poll title.",
"create.meta.input.description.label": "Description",
"create.meta.input.description.placeholder": "Optional: Add a description to the poll.",
"create.next": "Next",
"create.options.button.add.label": "add another option after this one",
"create.options.button.delete.label": "delete this option",
"create.options.options.label": "Answer options",
"create.options.error.notEnoughDates": "You have to choose either two days or one day plus the option 'set times'.",
"create.options.error.notEnoughOptions": "Enter at least two answer options.",
"create.options.defineTimes.label": "Set times?",
"create.options.input.moreOptions.label": "Add further answer options",
"create.options-datetime.datetimes.label": "Times",
"create.options-datetime.more-inputs": "Add further times",
"create.options-datetime.copy-first-line": "Adopt times of the first line for all others",
"create.options-datetime.error.notEnoughTimes": "At least one valid time has to be set per day. If only one day was chosen, at least two times have to be set.",
"create.options-datetime.error.correctTimeFormat": "Hours and minutes of the time have to be separated by a colon (e.g. 13:00).",
"create.settings.answerType.label": "Which answers should be available?",
"create.settings.anonymousUser.label": "Allow anonymous participation in the poll?",
"create.settings.expirationDate.label": "When should the poll expire and be deleted?",
"create.settings.expirationDurations.P7D": "a week from today",
"create.settings.expirationDurations.P1M": "a month from today",
"create.settings.expirationDurations.P3M": "three month from today",
"create.settings.expirationDurations.P6M": "six month from today",
"create.settings.expirationDurations.P1Y": "a year from today",
"create.settings.expirationDurations.never": "never",
"create.settings.forceAnswer.label": "Force answer for every option?",
"create.save": "Save",
"errors.inclusion": "is not part of the list",
"errors.exclusion": "reserved",
"errors.invalid": "invalid",
"errors.confirmation": "does not accord with {{attribute}}",
"errors.accepted": "has to be accepted",
"errors.empty": "cannot be left blank",
"errors.blank": "Must be filled in.",
"errors.present": "Has to be left blank.",
"errors.tooLong": "is too long (Maximum are {{count}} characters)",
"errors.tooShort": "Please insert at least {{count}} characters.",
"errors.wrongLength": "has invalid length (Minimum length {{count}} characters)",
"errors.notANumber": "is not a number",
"errors.notAnInteger": "Has to be a whole number.",
"errors.greaterThan": "has to be bigger than {{count}}",
"errors.greaterThanOrEqualTo": "must be bigger or same as {{count}}",
"errors.equalTo": "must equal {{count}}",
"errors.lessThan": "must be smaller than {{count}}",
"errors.lessThanOrEqualTo": "must be smaller or equal to {{count}}",
"errors.otherThan": "must be a different number than {{count}}",
"errors.odd": "must be unequal to",
"errors.even": "must be equal to",
"errors.url": "is not a valid URL",
"index.title": "Croodle simplifies making appointments and finding decisions ...<br/>... and at the same time protects your data",
"index.features.title": "Functions",
"index.features.list.overview": "<strong>Find a date</strong> or <strong>do a poll</strong> with as many people as you like.",
"index.features.list.privacy": "Your data stays private: Already in your browser they are being <strong>encrypted</strong>. Only the people who you send the link of the poll to will know what your poll is about.",
"index.features.list.options": "You can set as many <strong>answer options</strong> as you like. You can choose your <strong>preferred date</strong> or compile <strong>any questions</strong>",
"index.features.list.answers": "you can use <strong>pre-defined answer options</strong> like <i>yes</i>, <i>no</i>, <i>maybe</i> or allow <strong>own questions</strong>.",
"index.features.list.evaluation": "You keep the overview through <strong>overview of preferred answers</strong>.",
"index.link.have-a-try": "test it now",
"index.hoster.title": "Host your own Croodle:",
"index.hoster.text": "You dont have to trust this Croodle. Croodle is a free software and you can install it on your own server. You only a few megabytes memory capacity, PHP and SSL-encryption. You can find the software and tips for installation here <a href=\"https://github.com/jelhan/croodle\">GitHub</a>.",
"modal.save-retry.title": "Save failed",
"modal.save-retry.text": "<p>Your membership could not be saved. Please check your Internet connection and try it again.</p><p>If this does not help, a short-term failure of the server could be the problem. Please wait a few minutes before trying again. You can leave as long as the page opens.</p><p>If problem persists, please contact contact administrators of the page.</p>",
"modal.save-retry.button-retry": "Retry",
"poll.created-time": "Created on {{creationDate}}.",
"poll.error.newUser.everyOptionIsAnswered": "Please answer ever option.",
"poll.error.newUserName": "You have to give a user name.",
"poll.evaluation.label": "Evaluation",
"poll.evaluation.bestOption.label.findADate.one": "The preferred date is",
"poll.evaluation.bestOption.label.findADate.other": "The preferred dates are",
"poll.evaluation.bestOption.label.makeAPoll.one": "The preferred choice is",
"poll.evaluation.bestOption.label.makeAPoll.other": "The preferred choices are",
"poll.evaluation.bestOptionParticipants.findADate.yes.one": "One person is available.",
"poll.evaluation.bestOptionParticipants.findADate.yes.other": "{{count}} persons are available.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.one": "One person is maybe available.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.other": "{{count}} are maybe available.",
"poll.evaluation.bestOptionParticipants.findADate.no.one": "One person is unavailable.",
"poll.evaluation.bestOptionParticipants.findADate.no.other": "{{count}} persons are unavailable.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.one": "One person ticks this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.other": "{{count}} persons tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.one": "One person will maybe tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.other": "{{count}} persons will maybe tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.one": "One person won't tick this choice.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.other": "{{count}} persons won't tick this choice.",
"poll.evaluation.lastParticipation": "The last one participated {{ago}}.",
"poll.evaluation.participants.one": "One person had participated in the poll.",
"poll.evaluation.participants.other": "{{count}} persons have participated in the poll.",
"poll.input.newUserName.label": "Name",
"poll.input.newUserName.placeholder": "Your name",
"poll.modal.timezoneDiffers.title": "Which time zone should be used to display the data?",
"poll.modal.timezoneDiffers.body": "The poll has been set up for a time zone that differs from your local time. Which time zone should be used to display the data?",
"poll.modal.timezoneDiffers.button.useLocalTimezone": "my time zones",
"poll.modal.timezoneDiffers.button.usePollTimezone": "Original time zone",
"poll.save": "Save",
"poll.share": "Share the link and invite others to the poll.",
"poll.share.notice": "Anyone who knows the link can see your poll. If this contains private data, you should only pass on this link via encrypted e-mail or chat with end-to-end-encryption.",
"poll.input.showEvaluation.hide": "Hide",
"poll.input.showEvaluation.show": "Show",
"pollTypes.findADate.label": "I would like to make a date. (e.g. date or time for appointment)",
"pollTypes.makeAPoll.label": "I would like to answer a question. (e.g. what goes best with coffee?)"
}

View file

@ -0,0 +1,108 @@
export default {
"answerTypes.yes.label": "Si",
"answerTypes.no.label": "No",
"answerTypes.maybe.label": "Quizás",
"answerTypes.freeText.label": "Permitir escribir texto libremente",
"answerTypes.yesNo.label": "Si, No",
"answerTypes.yesNoMaybe.label": "Si, No, Quizás",
"create.index.input.pollType.label": "¿Que tipo de encuesta quieres hacer?",
"create.meta.input.title.label": "Título",
"create.meta.input.title.placeholder": "Añde el título de la encuesta.",
"create.meta.input.description.label": "Descripción",
"create.meta.input.description.placeholder": "Opcional: Añade una descripción a la encuesta.",
"create.next": "Siguiente",
"create.options.button.add.label": "add another option after this one",
"create.options.button.delete.label": "delete this option",
"create.options.options.label": "Opciones de respuesta",
"create.options.error.notEnoughDates": "Tienes que elegir almenos dos días o un único día con la opción 'establecer horarios'.",
"create.options.error.notEnoughOptions": "Introduce almenos dos opciones para la respuesta.",
"create.options.defineTimes.label": "¿Establecer horarios?",
"create.options.input.moreOptions.label": "Añadir más opciones de respuesta",
"create.options-datetime.datetimes.label": "Horarios",
"create.options-datetime.more-inputs": "Añadir más horarios",
"create.options-datetime.copy-first-line": "Utilizar el horario de la primera línea para todas las demás.",
"create.options-datetime.error.notEnoughTimes": "Ha de establecerse almenos un horario correcto para cada día. Si se ha elegido únicamente un día, hay que establecer almenos dos horarios.",
"create.options-datetime.error.correctTimeFormat": "Las horas y minutos del horario deben ser separadas por el caracter dospuntos (p.ej. 13:00).",
"create.settings.answerType.label": "¿Que respuesta debería estar disponible?",
"create.settings.anonymousUser.label": "¿permitir participantes anónimos en la encuesta?",
"create.settings.expirationDate.label": "When should the poll expire and be deleted?",
"create.settings.expirationDurations.P7D": "a week from today",
"create.settings.expirationDurations.P1M": "a month from today",
"create.settings.expirationDurations.P3M": "three month from today",
"create.settings.expirationDurations.P6M": "six month from today",
"create.settings.expirationDurations.P1Y": "a year from today",
"create.settings.expirationDurations.never": "never",
"create.settings.forceAnswer.label": "¿Obligar a responder todas las preguntas/opciones?",
"create.save": "Guardar",
"errors.inclusion": "no es parte de la lista",
"errors.exclusion": "reservado",
"errors.invalid": "invalido",
"errors.confirmation": "no concuerda con {{attribute}}",
"errors.accepted": "tiene que ser aceptado",
"errors.empty": "no puede dejarse vacío",
"errors.blank": "Debe rellenarse.",
"errors.present": "Debe dejarse vacío",
"errors.tooLong": "Es demasiado largo (el máximo son {{count}} caractéres)",
"errors.tooShort": "Por favor, escribir un mínimo de {{count}} caractéres.",
"errors.wrongLength": "tiene una longitud incorrecta (Un minimo de {{count}} caractéres)",
"errors.notANumber": "no es un número",
"errors.notAnInteger": "Tiene que ser un número entero.",
"errors.greaterThan": "tiene que ser mayor que {{count}}",
"errors.greaterThanOrEqualTo": "tiene que ser mayor o igual a {{count}}",
"errors.equalTo": "tiene que ser igual a {{count}}",
"errors.lessThan": "tiene que ser menor que {{count}}",
"errors.lessThanOrEqualTo": "tiene que ser menor o igual a {{count}}",
"errors.otherThan": "tiene que ser un número distinto que {{count}}",
"errors.odd": "tiene que ser distinto que",
"errors.even": "tiene que ser igual que",
"errors.url": "no es una URL valida",
"index.title": "Croodle simplifica las citas y la toma de decisiones ...<br/>... y al mismo tiempo protege tus datos",
"index.features.title": "Funciones",
"index.features.list.overview": "<strong>Encontrar una fecha</strong> o <strong>hacer una encuesta</strong> con la cantidad de personas que quieras.",
"index.features.list.privacy": "Tus datos son privados: Ya desde tu navegador los datos son <strong>encriptados</strong>. ünicamente las personas a las que mandes el enlace directamente sabrán que tu encuesta existe y de que se trata.",
"index.features.list.options": "Puedes incluir tantas <strong>opciones de respuesta</strong> como quieras. Puedes elegir tus <strong>fechas preferidas</strong> o escribir <strong>cualquier pregunta</strong>",
"index.features.list.answers": "Puedes utilizar <sttong>respuestas pre definidas</strong> como <i>si</i>,<i>no</i>, <i>quizás</i> o permitir una <strong>respuesta libre</strong>.",
"index.features.list.evaluation": "Mantendrás el control mediante la <strong>revisión de las respuestas favoritas</strong>.",
"index.link.have-a-try": "pruebalo ahora",
"index.hoster.title": "Instala tu propio Croodle:",
"index.hoster.text": "No tienes porque fiarte de este Croodle. Croodle es software libre y tu puedes instalarlo en tu propio servidor. Sólo unos pocos megas de espacio, PHP y encriptación-SSL. Puesde encontrar el software y ayuda en inglés para la instalación aquí <a href=\"https://github.com/jelhan/croodle\">GitHub</a>.",
"modal.save-retry.title": "Error al guardar",
"modal.save-retry.text": "<p>Tu inscripción no pudo ser guardada. Por favor, comprueba tu conexión a internet e inténtalo de nuevo.</p><p>Si esto no ayuda, podría ser debido a un breve fallo en el servidor. Por favor, espera unos minutos e inténtalo de nuevo. Puedes esperar mientras la página se abre.</p><p>Si los problemas continúan, por favor, contacte al administrador de la página.</p>",
"modal.save-retry.button-retry": "Reintentar",
"poll.created-time": "Creada el {{creationDate}}.",
"poll.error.newUser.everyOptionIsAnswered": "Por favor responde a todas las opciones.",
"poll.error.newUserName": "Tienes que poner un nombre.",
"poll.evaluation.label": "Evaluar",
"poll.evaluation.bestOption.label.findADate.one": "The preferred date is",
"poll.evaluation.bestOption.label.findADate.other": "The preferred dates are",
"poll.evaluation.bestOption.label.makeAPoll.one": "The preferred option is",
"poll.evaluation.bestOption.label.makeAPoll.other": "The preferred options are",
"poll.evaluation.bestOptionParticipants.findADate.yes.one": "One person has time.",
"poll.evaluation.bestOptionParticipants.findADate.yes.other": "{{count}} persons have time.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.one": "One person has maybe time.",
"poll.evaluation.bestOptionParticipants.findADate.maybe.other": "{{count}} have maybe time.",
"poll.evaluation.bestOptionParticipants.findADate.no.one": "One person has no time.",
"poll.evaluation.bestOptionParticipants.findADate.no.other": "{{count}} persons have no time.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.one": "One person likes this option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.yes.other": "{{count}} persons like these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.one": "One person maybe likes these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.maybe.other": "{{count}} persons like these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.one": "One person does not like these option.",
"poll.evaluation.bestOptionParticipants.makeAPoll.no.other": "{{count}} persons does not like these options.",
"poll.evaluation.lastParticipation": "The last person has participated {{ago}}.",
"poll.evaluation.participants.one": "One person had participated in the poll.",
"poll.evaluation.participants.other": "{{count}} persons have participated in the poll.",
"poll.input.newUserName.label": "Name",
"poll.input.newUserName.placeholder": "Tu nombre",
"poll.modal.timezoneDiffers.title": "¿Que zona horaria deseas utilizar para mostrar los datos?",
"poll.modal.timezoneDiffers.body": "La encuesta ha sido configurada para una zona horaria distinta de tu hora local. ¿Con qué zona horaria debería mostrarse la información?",
"poll.modal.timezoneDiffers.button.useLocalTimezone": "mi zona horaria",
"poll.modal.timezoneDiffers.button.usePollTimezone": "la zona horaria original",
"poll.save": "Guardar",
"poll.share": "Comparte el enlace e invita a otras personas a la encuesta.",
"poll.share.notice": "Cualquiera que conozca el enlace podrá ver tu encuesta. Si esta contiene información privada deberías compartir el enlace únicamente mediante un correo electrónico encriptado o mediante chat con encriptación de-punto-a-punto.",
"poll.input.showEvaluation.hide": "Esconder",
"poll.input.showEvaluation.show": "Mostrar",
"pollTypes.findADate.label": "Querría crear una fecha (p. ej. fecha para una reunión).",
"pollTypes.makeAPoll.label": "Querría responder a una pregunta (p. ej. ¿con que tomas el café?)."
};

View file

@ -11,7 +11,7 @@ export default Ember.Route.extend({
controller: modalController controller: modalController
}); });
}, },
removeModal: function(){ removeModal: function(){
this.disconnectOutlet({ this.disconnectOutlet({
outlet: 'modal', outlet: 'modal',
@ -19,4 +19,4 @@ export default Ember.Route.extend({
}); });
} }
} }
}); });

View file

@ -16,7 +16,7 @@ body {
#header h1.logo { #header h1.logo {
float: left; float: left;
} }
#header #language-switch { #header .language-select {
float: right; float: right;
margin-top: 20px; margin-top: 20px;
} }

View file

@ -1,11 +1,13 @@
<div class="container-fluid"> <div class="container-fluid">
<div id="header"> <div id="header">
<h1 class="logo">{{#link-to 'index'}}Croodle{{/link-to}}</h1> <h1 class="logo">{{#link-to 'index'}}Croodle{{/link-to}}</h1>
{{view "language-switch"}} <form class="form-inline">
{{language-select class="form-control"}}
</form>
</div> </div>
<div id="content"> <div id="content">
{{outlet}} {{outlet}}
</div> </div>
</div> </div>
{{outlet 'modal'}} {{outlet 'modal'}}

View file

@ -0,0 +1,3 @@
{{#each locales as |locale|}}
<option value="{{locale.id}}">{{locale.text}}</option>
{{/each}}

View file

@ -37,7 +37,7 @@
multidate=true multidate=true
calendarWeeks=true calendarWeeks=true
todayHighlight=true todayHighlight=true
language=language.selected language=i18n.locale
}} }}
</div> </div>

View file

@ -1,3 +0,0 @@
<div id="language-switch">
{{view "select" content=view.languages selection=controller.language.selected}}
</div>

View file

@ -1,14 +0,0 @@
import Ember from "ember";
import translations from "croodle/lang/translations";
export default Ember.View.extend({
templateName: 'language-switch',
languages: function() {
var languages = [];
for(var lang in translations) {
languages.push(lang);
}
return languages;
}.property()
});

View file

@ -1,7 +1,7 @@
import Ember from "ember"; import Ember from "ember";
/* global moment */ /* global moment */
export default Ember.View.extend(Ember.I18n.TranslateableProperties, { export default Ember.View.extend({
showEvaluation: false, showEvaluation: false,
actions: { actions: {

View file

@ -1,6 +1,6 @@
import Ember from "ember"; import Ember from "ember";
export default Ember.View.extend(Ember.I18n.TranslateableProperties, { export default Ember.View.extend({
didInsertElement : function(){ didInsertElement : function(){
this._super(); this._super();
Ember.run.scheduleOnce('afterRender', this, function(){ Ember.run.scheduleOnce('afterRender', this, function(){

View file

@ -15,7 +15,7 @@ module.exports = function(environment) {
// Here you can pass flags/options to your application instance // Here you can pass flags/options to your application instance
// when it is created // when it is created
}, },
contentSecurityPolicy: { contentSecurityPolicy: {
'default-src': "'none'", 'default-src': "'none'",
'script-src': "'self' 'unsafe-eval'", 'script-src': "'self' 'unsafe-eval'",
@ -29,6 +29,10 @@ module.exports = function(environment) {
moment: { moment: {
includeLocales: ['de', 'es'], includeLocales: ['de', 'es'],
includeTimezone: '2010-2020' includeTimezone: '2010-2020'
},
i18n: {
defaultLocale: 'en'
} }
}; };

View file

@ -49,9 +49,6 @@ module.exports = function(defaults) {
app.import('bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js'); app.import('bower_components/bootstrap-datepicker/js/bootstrap-datepicker.js');
app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js'); app.import('bower_components/bootstrap-datepicker/js/locales/bootstrap-datepicker.de.js');
app.import('bower_components/ember-i18n/lib/i18n.js');
app.import('bower_components/ember-i18n/lib/i18n-plurals.js');
app.import({ app.import({
development: 'bower_components/floatThead/dist/jquery.floatThead.js', development: 'bower_components/floatThead/dist/jquery.floatThead.js',
production: 'bower_components/floatThead/dist/jquery.floatThead.min.js' production: 'bower_components/floatThead/dist/jquery.floatThead.min.js'

View file

@ -50,6 +50,7 @@
"ember-export-application-global": "^1.0.3", "ember-export-application-global": "^1.0.3",
"ember-form-master-2000": "0.2.0", "ember-form-master-2000": "0.2.0",
"ember-get-helper": "1.0.4", "ember-get-helper": "1.0.4",
"ember-i18n": "4.1.4",
"ember-moment": "3.6.4", "ember-moment": "3.6.4",
"ember-radio-button": "^0.1.2", "ember-radio-button": "^0.1.2",
"express": "^4.8.5", "express": "^4.8.5",

View file

@ -30,7 +30,8 @@
"pollHasAnswers", "pollHasAnswers",
"pollParticipate", "pollParticipate",
"selectDates", "selectDates",
"switchTab" "switchTab",
"t"
], ],
"node": false, "node": false,
"browser": false, "browser": false,

View file

@ -3,7 +3,6 @@ import { module, test } from 'qunit';
import startApp from '../helpers/start-app'; import startApp from '../helpers/start-app';
import Pretender from 'pretender'; import Pretender from 'pretender';
import serverPostPolls from '../helpers/server-post-polls'; import serverPostPolls from '../helpers/server-post-polls';
import formattedDateHelper from 'croodle/helpers/formatted-date';
/* global moment */ /* global moment */
/* jshint proto: true */ /* jshint proto: true */
@ -91,8 +90,8 @@ test("create a default poll", function(assert) {
pollDescriptionEqual(assert, ''); pollDescriptionEqual(assert, '');
pollHasOptions(assert, formattedDates); pollHasOptions(assert, formattedDates);
pollHasAnswers(assert, [ pollHasAnswers(assert, [
Ember.I18n.t('answerTypes.yes.label'), t('answerTypes.yes.label'),
Ember.I18n.t('answerTypes.no.label') t('answerTypes.no.label')
]); ]);
pollHasUsersCount(assert, 0); pollHasUsersCount(assert, 0);
}); });

View file

@ -15,6 +15,7 @@ module('Acceptance | participate in a poll', {
server = new Pretender(); server = new Pretender();
}, },
afterEach: function() { afterEach: function() {
server.shutdown(); server.shutdown();
@ -51,7 +52,7 @@ test("participate in a default poll", function(assert) {
'encryption key is part of query params' 'encryption key is part of query params'
); );
pollHasUsersCount(assert, 1, "user is added to user selections table"); pollHasUsersCount(assert, 1, "user is added to user selections table");
pollHasUser(assert, 'Max Meiner', [Ember.I18n.t('answerTypes.yes.label'), Ember.I18n.t('answerTypes.no.label')]); pollHasUser(assert, 'Max Meiner', [t('answerTypes.yes.label'), t('answerTypes.no.label')]);
}); });
}); });
}); });
@ -116,7 +117,7 @@ test("participate in a poll which doesn't force an answer to all options", funct
andThen(function(){ andThen(function(){
assert.equal(currentPath(), 'poll.evaluation'); assert.equal(currentPath(), 'poll.evaluation');
pollHasUsersCount(assert, 1, "user is added to user selections table"); pollHasUsersCount(assert, 1, "user is added to user selections table");
pollHasUser(assert, "Karl Käfer", [Ember.I18n.t("answerTypes.yes.label"), ""]); pollHasUser(assert, "Karl Käfer", [t("answerTypes.yes.label"), ""]);
}); });
}); });
}); });
@ -148,7 +149,7 @@ test("participate in a poll which allows anonymous participation", function(asse
andThen(function(){ andThen(function(){
assert.equal(currentPath(), 'poll.evaluation'); assert.equal(currentPath(), 'poll.evaluation');
pollHasUsersCount(assert, 1, "user is added to user selections table"); pollHasUsersCount(assert, 1, "user is added to user selections table");
pollHasUser(assert, "", [Ember.I18n.t("answerTypes.yes.label"), Ember.I18n.t("answerTypes.no.label")]); pollHasUser(assert, "", [("answerTypes.yes.label"), ("answerTypes.no.label")]);
}); });
}); });
}); });

View file

@ -1,6 +1,6 @@
import Ember from 'ember'; import Ember from 'ember';
export default Ember.Test.registerHelper('pollHasOptions', function(app, assert, expectedOptions, dateGroups) { export default Ember.Test.registerHelper('pollHasOptions', function(app, assert, expectedOptions) {
var elBase = find('.participation .selections'); var elBase = find('.participation .selections');
assert.equal( assert.equal(

View file

@ -9,6 +9,7 @@ import './poll-has-answers';
import './poll-participate'; import './poll-participate';
import './select-dates'; import './select-dates';
import './switch-tab'; import './switch-tab';
import './t';
export default function startApp(attrs) { export default function startApp(attrs) {
var application; var application;

5
tests/helpers/t.js Normal file
View file

@ -0,0 +1,5 @@
import Ember from 'ember';
export default Ember.Test.registerHelper('t', function(app, key, context) {
return app.__container__.lookup('service:i18n').t(key, context);
});

View file

@ -70,9 +70,9 @@ test("create a default poll and participate", function(assert) {
assert, assert,
'Max Hoelz', 'Max Hoelz',
[ [
Ember.I18n.t('answerTypes.no.label'), t('answerTypes.no.label'),
Ember.I18n.t('answerTypes.no.label'), t('answerTypes.no.label'),
Ember.I18n.t('answerTypes.yes.label') t('answerTypes.yes.label')
] ]
); );
}); });

View file

@ -33,9 +33,9 @@ test('show a default poll created with v0.3.0', function(assert) {
]); ]);
pollHasAnswers(assert, [ pollHasAnswers(assert, [
Ember.I18n.t('answerTypes.yes.label'), t('answerTypes.yes.label'),
Ember.I18n.t('answerTypes.maybe.label'), t('answerTypes.maybe.label'),
Ember.I18n.t('answerTypes.no.label') t('answerTypes.no.label')
]); ]);
switchTab('evaluation'); switchTab('evaluation');
@ -46,17 +46,17 @@ test('show a default poll created with v0.3.0', function(assert) {
pollHasUser(assert, pollHasUser(assert,
'Fritz Bauer', 'Fritz Bauer',
[ [
Ember.I18n.t('answerTypes.yes.label'), t('answerTypes.yes.label'),
Ember.I18n.t('answerTypes.no.label'), t('answerTypes.no.label'),
Ember.I18n.t('answerTypes.no.label') t('answerTypes.no.label')
] ]
); );
pollHasUser(assert, pollHasUser(assert,
'Lothar Hermann', 'Lothar Hermann',
[ [
Ember.I18n.t('answerTypes.maybe.label'), t('answerTypes.maybe.label'),
Ember.I18n.t('answerTypes.yes.label'), t('answerTypes.yes.label'),
Ember.I18n.t('answerTypes.no.label') t('answerTypes.no.label')
] ]
); );
@ -72,9 +72,9 @@ test('show a default poll created with v0.3.0', function(assert) {
pollHasUser(assert, pollHasUser(assert,
'Hermann Langbein', 'Hermann Langbein',
[ [
Ember.I18n.t('answerTypes.yes.label'), t('answerTypes.yes.label'),
Ember.I18n.t('answerTypes.maybe.label'), t('answerTypes.maybe.label'),
Ember.I18n.t('answerTypes.yes.label') t('answerTypes.yes.label')
] ]
); );
}); });

View file

@ -1,30 +0,0 @@
import languages from '../../lang/translations';
import { module, test } from 'qunit';
module('Unit | languages');
// Replace this with your real tests.
test('translations are correct', function(assert) {
assert.ok(languages);
Object.keys(languages).map(function(language) {
if (language !== 'en') {
assert.equal(
Object.keys(languages[language]).length,
Object.keys(languages.en).length,
'language ' + language + ' has same amount of translation keys as english language'
);
}
});
Object.keys(languages.en).map(function(translationKey) {
Object.keys(languages).map(function(language) {
if (language !== 'en') {
assert.ok(
languages[language][translationKey],
'translation with key ' + translationKey + ' exist for language ' + language
);
}
});
});
});