Skip to content

Commit

Permalink
Replace underscore with dots in translation keys
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Sep 29, 2017
1 parent b0975c9 commit f2e4988
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/classifier/tasks/survey/choice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Choice extends React.Component {
const choice = this.props.task.choices[this.props.choiceID];
let hasFocus = choice.images.length > 1;
const taskStrings = translations.strings.workflow.tasks;
const translationKey = `${this.props.annotation.task}_choices.${this.props.choiceId}`;
const translationKey = `${this.props.annotation.task}.choices.${this.props.choiceId}`;
return (
<div className="survey-task-choice">
{choice.images.length > 0 &&
Expand All @@ -95,7 +95,7 @@ class Choice extends React.Component {
{' '}
{choice.confusionsOrder.map((otherChoiceID, i) => {
const otherChoice = this.props.task.choices[otherChoiceID];
const translationKey = `${this.props.annotation.task}_choices.${otherChoiceId}`;
const translationKey = `${this.props.annotation.task}.choices.${otherChoiceId}`;
return (
<span key={otherChoiceID}>
<TriggeredModalForm
Expand Down Expand Up @@ -142,7 +142,7 @@ class Choice extends React.Component {
Utility.getQuestionIDs(this.props.task, this.props.choiceID).map((questionId) => {
const question = this.props.task.questions[questionId];
const inputType = question.multiple ? 'checkbox' : 'radio';
const translationKey = `${this.props.annotation.task}_questions.${questionId}`
const translationKey = `${this.props.annotation.task}.questions.${questionId}`
return (
<div key={questionId} className="survey-task-choice-question" data-multiple={question.multiple || null}>
<div className="survey-task-choice-question-label">{taskStrings[`${translationKey}.label`] || question.label}</div>
Expand Down
4 changes: 2 additions & 2 deletions app/classifier/tasks/survey/chooser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Chooser extends React.Component {
{this.props.task.characteristicsOrder.map((characteristicId, i) => {
const characteristic = this.props.task.characteristics[characteristicId];
const selectedValue = characteristic.values[this.props.filters[characteristicId]];
const translationKey = `${this.props.annotation.task}_characteristics.${characteristicId}`;
const translationKey = `${this.props.annotation.task}.characteristics.${characteristicId}`;
let hasBeenAutoFocused = false;
return (
<TriggeredModalForm
Expand Down Expand Up @@ -210,7 +210,7 @@ class Chooser extends React.Component {
{sortedFilteredChoices.map((choiceId, i) => {
const choice = this.props.task.choices[choiceId];
const chosenAlready = selectedChoices.indexOf(choiceId) > -1;
const translationKey = `${this.props.annotation.task}_choices.${choiceId}.label`;
const translationKey = `${this.props.annotation.task}.choices.${choiceId}.label`;
let tabIndex = -1;
if (i === 0 && this.props.focusedChoice.length === 0) {
tabIndex = 0;
Expand Down

0 comments on commit f2e4988

Please sign in to comment.