Skip to content

Commit

Permalink
Persian language (#246)
Browse files Browse the repository at this point in the history
* fix: corrected typos

explaination -> explanation
Critera -> Criteria
addtional -> additional
arbitary -> arbitrary
penging -> pending
downladFiles -> downloadFiles
isLoadeed -> isLoaded
selectror -> selector
commnents -> comments
stirng -> string
isGragrding -> isGrading
queu -> queue
seleted -> selected
feecback -> feedback

* feat: Persian language (fa_IR) added

* chore: Persian translations added

* chore: sort language codes alphabetically

* chore: camelCase variable used for translated messages

* chore: deprecated styling updated

---------

Co-authored-by: Leangseu Kim <[email protected]>
  • Loading branch information
CodeWithEmad and leangseu-edx authored Sep 11, 2023
1 parent 358263d commit e25a5a9
Show file tree
Hide file tree
Showing 38 changed files with 87 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ npm-install-%: ## install specified % npm package
git add package.json

transifex_resource = frontend-app-ora-grading
transifex_langs = "ar,fr,es_419,zh_CN,fr_CA,it_IT,pt_PT,de_DE,uk,ru,hi"
transifex_langs = "ar,de_DE,es_419,fa_IR,fr,fr_CA,hi,it_IT,pt_PT,uk,ru,zh_CN"

intl_imports = ./node_modules/.bin/intl-imports.js
transifex_utils = ./node_modules/.bin/transifex-utils.js
Expand Down
1 change: 0 additions & 1 deletion documentation/.ci.yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ There are only two requirements for a good `make target` name
What `make validate-no-uncommitted-package-lock-changes` does is `git diff`s for any `package-lock.json` file changes in your project.

This is important because `npm` uses the pinned dependencies in your `package-lock.json` file to build the `node_modules` directory. However, the dependencies defined within the `package.json` file can be modified manually, for example, to become misaligned with the dependencies defined within the `package-lock.json`. So when `npm install` executes, the `package-lock.json` file will be updated to mirror the modified `package.json` changes.

2 changes: 1 addition & 1 deletion src/components/FilePreview/FileCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@

@include media-breakpoint-down(sm) {
.file-card-title {
width: map-get($container-max-widths, "sm")/2;
width: calc(map-get($container-max-widths, "sm")/2);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe('Criterion Feedback', () => {
});

describe('mapStateToProps', () => {
const testState = { abitaryState: 'some data' };
const testState = { arbitraryState: 'some data' };
const ownProps = { orderNum: props.orderNum };
let mapped;
beforeEach(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/containers/CriterionContainer/RadioCriterion.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ describe('Radio Criterion Container', () => {
feedback: 'feedback mock',
options: [
{
explanation: 'explaination',
explanation: 'explanation',
feedback: 'option feedback',
label: 'this label',
name: 'option name',
points: 1,
},
{
explanation: 'explaination 2',
explanation: 'explanation 2',
feedback: 'option feedback 2',
label: 'this label 2',
name: 'option name 2',
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('Radio Criterion Container', () => {
});

describe('mapStateToProps', () => {
const testState = { arbitary: 'some data' };
const testState = { arbitrary: 'some data' };
const ownProps = { orderNum: props.orderNum };
let mapped;
beforeEach(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/containers/CriterionContainer/ReviewCriterion.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ describe('Review Crition Container', () => {
feedback: 'feedback mock',
options: [
{
explanation: 'explaination',
explanation: 'explanation',
feedback: 'option feedback',
label: 'this label',
name: 'option name',
points: 1,
},
{
explanation: 'explaination 2',
explanation: 'explanation 2',
feedback: 'option feedback 2',
label: 'this label 2',
name: 'option name 2',
Expand Down Expand Up @@ -78,7 +78,7 @@ describe('Review Crition Container', () => {
});

describe('mapStateToProps', () => {
const testState = { arbitary: 'some data' };
const testState = { arbitrary: 'some data' };
const ownProps = { orderNum: props.orderNum };
let mapped;
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`Criterion Container snapshot is graded and is not grading 1`] = `
this label
</strong>
<br />
explaination
explanation
</div>
<div
className="help-popover-option"
Expand All @@ -29,7 +29,7 @@ exports[`Criterion Container snapshot is graded and is not grading 1`] = `
this label 2
</strong>
<br />
explaination 2
explanation 2
</div>
</InfoPopover>
</Form.Label>
Expand Down Expand Up @@ -67,7 +67,7 @@ exports[`Criterion Container snapshot is ungraded and is grading 1`] = `
this label
</strong>
<br />
explaination
explanation
</div>
<div
className="help-popover-option"
Expand All @@ -77,7 +77,7 @@ exports[`Criterion Container snapshot is ungraded and is grading 1`] = `
this label 2
</strong>
<br />
explaination 2
explanation 2
</div>
</InfoPopover>
</Form.Label>
Expand Down Expand Up @@ -115,7 +115,7 @@ exports[`Criterion Container snapshot is ungraded and is not grading 1`] = `
this label
</strong>
<br />
explaination
explanation
</div>
<div
className="help-popover-option"
Expand All @@ -125,7 +125,7 @@ exports[`Criterion Container snapshot is ungraded and is not grading 1`] = `
this label 2
</strong>
<br />
explaination 2
explanation 2
</div>
</InfoPopover>
</Form.Label>
Expand Down
18 changes: 9 additions & 9 deletions src/containers/CriterionContainer/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ describe('Criterion Container', () => {
feedback: 'feedback mock',
options: [
{
explanation: 'explaination',
explanation: 'explanation',
feedback: 'option feedback',
label: 'this label',
name: 'option name',
points: 2,
},
{
explanation: 'explaination 2',
explanation: 'explanation 2',
feedback: 'option feedback 2',
label: 'this label 2',
name: 'option name 2',
Expand Down Expand Up @@ -89,30 +89,30 @@ describe('Criterion Container', () => {
});

test('is ungraded and is grading (Radio criterion get render)', () => {
const rubricCritera = el.find('.rubric-criteria');
expect(rubricCritera.children(0).name()).toEqual('RadioCriterion');
const rubricCriteria = el.find('.rubric-criteria');
expect(rubricCriteria.children(0).name()).toEqual('RadioCriterion');
});

test('is ungraded and is not grading (Review criterion get render)', () => {
el.setProps({
isGrading: false,
});
const rubricCritera = el.find('.rubric-criteria');
expect(rubricCritera.children(0).name()).toEqual('ReviewCriterion');
const rubricCriteria = el.find('.rubric-criteria');
expect(rubricCriteria.children(0).name()).toEqual('ReviewCriterion');
});

test('is graded and is not grading (Radio criterion get render)', () => {
el.setProps({
isGrading: false,
gradeStatus: gradeStatuses.graded,
});
const rubricCritera = el.find('.rubric-criteria');
expect(rubricCritera.children(0).name()).toEqual('RadioCriterion');
const rubricCriteria = el.find('.rubric-criteria');
expect(rubricCriteria.children(0).name()).toEqual('RadioCriterion');
});
});

describe('mapStateToProps', () => {
const testState = { abitaryState: 'some data' };
const testState = { arbitraryState: 'some data' };
const ownProps = { orderNum: props.orderNum };
let mapped;
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/CriterionContainer/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const messages = defineMessages({
optional: {
id: 'ora-grading.CriterionFeedback.optional',
defaultMessage: '(Optional)',
description: 'addtional label for optional feedback field',
description: 'additional label for optional feedback field',
},
optionPoints: {
id: 'ora-grading.RadioCriterion.optionPoints',
Expand Down
4 changes: 2 additions & 2 deletions src/containers/ListView/SubmissionsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export class SubmissionsTable extends React.Component {
translate = (...args) => this.props.intl.formatMessage(...args);

handleViewAllResponsesClick = (data) => () => {
const getsubmissionUUID = (row) => row.original.submissionUUID;
this.props.loadSelectionForReview(data.map(getsubmissionUUID));
const getSubmissionUUID = (row) => row.original.submissionUUID;
this.props.loadSelectionForReview(data.map(getSubmissionUUID));
};

render() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exports[`FileDownload component snapshot download is completed 1`] = `
/>,
"pending": <FormattedMessage
defaultMessage="Downloading"
description="Download files penging state label"
description="Download files pending state label"
id="ora-grading.ResponseDisplay.SubmissionFiles.downloading"
/>,
}
Expand Down Expand Up @@ -96,7 +96,7 @@ exports[`FileDownload component snapshot download is failed 1`] = `
/>,
"pending": <FormattedMessage
defaultMessage="Downloading"
description="Download files penging state label"
description="Download files pending state label"
id="ora-grading.ResponseDisplay.SubmissionFiles.downloading"
/>,
}
Expand Down Expand Up @@ -149,7 +149,7 @@ exports[`FileDownload component snapshot download is inactive 1`] = `
/>,
"pending": <FormattedMessage
defaultMessage="Downloading"
description="Download files penging state label"
description="Download files pending state label"
id="ora-grading.ResponseDisplay.SubmissionFiles.downloading"
/>,
}
Expand Down Expand Up @@ -202,7 +202,7 @@ exports[`FileDownload component snapshot download is pending 1`] = `
/>,
"pending": <FormattedMessage
defaultMessage="Downloading"
description="Download files penging state label"
description="Download files pending state label"
id="ora-grading.ResponseDisplay.SubmissionFiles.downloading"
/>,
}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/ResponseDisplay/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const messages = defineMessages({
downloading: {
id: 'ora-grading.ResponseDisplay.SubmissionFiles.downloading',
defaultMessage: 'Downloading',
description: 'Download files penging state label',
description: 'Download files pending state label',
},
downloaded: {
id: 'ora-grading.ResponseDisplay.SubmissionFiles.downloaded',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jest.mock('data/redux/grading/selectors', () => ({
doesExist: (state) => ({ nextDoesExist: state }),
},
activeIndex: (state) => ({ activeIndex: state }),
selectionLength: (state) => ({ selectionlength: state }),
selectionLength: (state) => ({ selectionLength: state }),
}));
jest.mock('data/redux/requests/selectors', () => ({
allowNavigation: (state) => ({ allowNavigation: state }),
Expand Down
2 changes: 1 addition & 1 deletion src/containers/ReviewModal/ReviewContent.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('ReviewContent component', () => {
test('isFailed loads from requests.isFailed(fetchSubmission)', () => {
expect(mapped.isFailed).toEqual(selectors.requests.isFailed(testState, { requestKey }));
});
test('isLoadeed loads from requests.isCompleted(fetchSubmission)', () => {
test('isLoaded loads from requests.isCompleted(fetchSubmission)', () => {
expect(mapped.isLoaded).toEqual(selectors.requests.isCompleted(testState, { requestKey }));
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('DownloadErrors component', () => {
});
describe('behavior', () => {
describe('clearState', () => {
it('calls props.clearState with requestKey: downladFiles', () => {
it('calls props.clearState with requestKey: downloadFiles', () => {
el.instance().cancelAction();
expect(props.clearState).toHaveBeenCalledWith({ requestKey: RequestKeys.downloadFiles });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('Review Modal Submit Error hooks', () => {
errorStatus = 'test-status';
const mockErrorProps = (args) => ({
confirm: { confirm: args },
headingMessag: { headingMessage: args },
headingMessage: { headingMessage: args },
contentMessage: { contentMessage: args },
});
const mockProps = mockErrorProps({ dispatch, errorStatus });
Expand Down
6 changes: 3 additions & 3 deletions src/containers/Rubric/RubricFeedback.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jest.mock('data/redux/grading/selectors', () => ({
overallFeedback: jest.fn((...args) => ({
selectedOverallFeedback: args,
})),
isGrading: jest.fn((...args) => ({ isGragrding: args })),
isGrading: jest.fn((...args) => ({ isGrading: args })),
},
validation: {
overallFeedbackIsInvalid: jest.fn((...args) => ({
Expand All @@ -44,7 +44,7 @@ jest.mock('data/redux/grading/selectors', () => ({
describe('Rubric Feedback component', () => {
const props = {
intl: { formatMessage },
config: 'config stirng',
config: 'config string',
isGrading: true,
value: 'some value',
isInvalid: false,
Expand Down Expand Up @@ -135,7 +135,7 @@ describe('Rubric Feedback component', () => {
});

describe('mapStateToProps', () => {
const testState = { abitaryState: 'some data' };
const testState = { arbitraryState: 'some data' };
let mapped;
beforeEach(() => {
mapped = mapStateToProps(testState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`Rubric Feedback component snapshot feedback value is invalid 1`] = `
>
<FormattedMessage
defaultMessage="Overall comments"
description="Rubric overall commnents label"
description="Rubric overall comments label"
id="ora-grading.Rubric.overallComments"
/>
</span>
Expand Down Expand Up @@ -53,7 +53,7 @@ exports[`Rubric Feedback component snapshot is graded 1`] = `
>
<FormattedMessage
defaultMessage="Overall comments"
description="Rubric overall commnents label"
description="Rubric overall comments label"
id="ora-grading.Rubric.overallComments"
/>
</span>
Expand Down Expand Up @@ -84,7 +84,7 @@ exports[`Rubric Feedback component snapshot is grading 1`] = `
>
<FormattedMessage
defaultMessage="Overall comments"
description="Rubric overall commnents label"
description="Rubric overall comments label"
id="ora-grading.Rubric.overallComments"
/>
</span>
Expand Down
6 changes: 3 additions & 3 deletions src/containers/Rubric/hooks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ describe('Rubric hooks', () => {
afterEach(state.restore);
describe('redux values', () => {
beforeEach(() => { hook = hooks.reduxValues(); });
test('loads gradeIsPending from isPending requests selectror on submitGrade request', () => {
test('loads gradeIsPending from isPending requests selector on submitGrade request', () => {
expect(hook.gradeIsPending.useSelector(testState)).toEqual(
selectors.requests.isPending(testState, { requestKey: RequestKeys.submitGrade }),
);
});
test('loads criteriaIndices from rubric selector', () => {
expect(hook.criteriaIndices).toEqual(useSelector(selectors.app.rubric.criteriaIndices));
});
test('loads isCompleted from requests selectror on submitGrade request', () => {
test('loads isCompleted from requests selector on submitGrade request', () => {
expect(hook.isCompleted.useSelector(testState)).toEqual(
selectors.requests.isCompleted(testState, { requestKey: RequestKeys.submitGrade }),
);
Expand All @@ -62,7 +62,7 @@ describe('Rubric hooks', () => {
test('loads isGrading from grading selector for selected submission', () => {
expect(hook.isGrading).toEqual(useSelector(selectors.grading.selected.isGrading));
});
test('loads lockIsPending from isPending requests selectror on setLock request', () => {
test('loads lockIsPending from isPending requests selector on setLock request', () => {
expect(hook.lockIsPending.useSelector(testState)).toEqual(
selectors.requests.isPending(testState, { requestKey: RequestKeys.setLock }),
);
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Rubric/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const messages = defineMessages({
overallComments: {
id: 'ora-grading.Rubric.overallComments',
defaultMessage: 'Overall comments',
description: 'Rubric overall commnents label',
description: 'Rubric overall comments label',
},
addComments: {
id: 'ora-grading.Rubric.addComments',
Expand Down
Loading

0 comments on commit e25a5a9

Please sign in to comment.