-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add i18n #27
Merged
Merged
Add i18n #27
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
dc20691
Add internationalization
Niharika29 82be74e
Add internationalization
Niharika29 3dd1a4f
Merge branch 'addI18n' of https://github.com/Niharika29/CopyPatrol in…
Niharika29 ae39d50
update build status URL to reflect new location
MusikAnimal 298731e
rm DB_DSN_WIKIPROJECT no longer using this service
MusikAnimal f124155
Update messages, remove html
Niharika29 283a49a
Generalize i18n messages, use {% set %} to nest markup in messages
MusikAnimal 3e8e81d
safe - dont fail on missing metadata
eranroz 7364f00
rm extra parenthesis
eranroz ecda678
Merge pull request #28 from eranroz/master
MusikAnimal a12cc60
Split out header, footer & modal; Add qqq; Changes per review
Niharika29 4188d98
Add internationalization
Niharika29 8d4f93b
Add internationalization
Niharika29 8b81663
Update messages, remove html
Niharika29 6a96c26
Generalize i18n messages, use {% set %} to nest markup in messages
MusikAnimal 54e1dc9
Split out header, footer & modal; Add qqq; Changes per review
Niharika29 b631075
Merge branch 'addI18n' of https://github.com/Niharika29/CopyPatrol in…
Niharika29 80c58ae
qqq fixes; fix indentation
Niharika29 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"@metadata": { | ||
"authors": [ | ||
"Niharika Kohli", | ||
"MusikAnimal", | ||
"Ryan Kaldari" | ||
] | ||
}, | ||
"name": "CopyPatrol", | ||
"documentation": "Documentation", | ||
"feedback": "Feedback", | ||
"leaderboard": "Leaderboard", | ||
"login": "Login", | ||
"logout": "Logout", | ||
"header-loggedin": "You are logged in as: $1", | ||
"form-all": "All cases", | ||
"form-open": "Open cases", | ||
"form-reviewed": "Reviewed cases", | ||
"form-mine": "My reviews", | ||
"form-drafts": "Drafts only", | ||
"wikiprojects": "WikiProjects", | ||
"form-wikiprojects-placeholder": "Type WikiProject names...", | ||
"submit": "Submit", | ||
"page": "Page", | ||
"diff": "Diff", | ||
"editor": "Editor", | ||
"review": "Review", | ||
"review-fixed": "Page fixed", | ||
"review-fixed-tooltip": "The edit was a copyright violation and has been reverted", | ||
"review-false": "No action needed", | ||
"review-false-tooltip": "The edit is a false positive, nothing needs to be done", | ||
"review-by": "Reviewed by:", | ||
"history": "History", | ||
"talk": "Talk", | ||
"contribs": "Contributions", | ||
"record-editcount": "Edit count:", | ||
"compare": "Compare", | ||
"record-ithenticate": "iThenticate report", | ||
"record-url-text": "$1 of edit ($2 words)", | ||
"record-noeditor": "No editor found", | ||
"record-noeditor-tooltip": "The revision may have been deleted or the data is not yet available in Labs database.", | ||
"record-ores": "ORES score: $1", | ||
"article": "Article", | ||
"compare-article-loading": "Loading article revision...", | ||
"compare-source-loading": "Loading possible copyvio source...", | ||
"footer-loadmore": "Load More", | ||
"footer-nomore": "No more records!", | ||
"footer-broughtby": "Brought to you by $1", | ||
"footer-commtech": "Community Tech", | ||
"footer-poweredby": "Powered by $1 and $2", | ||
"source": "Source", | ||
"phabricator": "Phabricator", | ||
"footer-imageattr": "Image attribution", | ||
"lboard-title": "Leaderboard", | ||
"lboard-week": "Cases closed in the last 7 days", | ||
"lboard-month": "Cases closed in the last 30 days", | ||
"lboard-alltime": "All time cases closed", | ||
"lboard-back": "Back to CopyPatrol", | ||
"close": "Close", | ||
"imageattr-title": "Image attribution", | ||
"imageattr-logo": "CopyPatrol logo", | ||
"public-domain": "public domain", | ||
"open-font-license": "Open Font License", | ||
"imageattr-paragraph1": "$1 available to the $2 courtesy of $3 and the $4", | ||
"imageattr-paragraph2": "$1 released under the $2 courtesy of $3", | ||
"alert-testing": "This is a staging environment. Please do not use this tool to record your reviews. For the actual CopyPatrol tool, please use $1.", | ||
"js-unauthorized": "You need to be logged in to be able to review.", | ||
"js-dberror": "There was an error in connecting to database.", | ||
"js-undo-own-only": "You can only undo your own reviews.", | ||
"js-unknown-error": "An unknown error occurred when loading results. Please try again." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"@metadata": { | ||
"authors": [ | ||
"Niharika Kohli", | ||
"MusikAnimal", | ||
"Ryan Kaldari" | ||
] | ||
}, | ||
"name": "{{Optional}}\nTitle of the application/tool", | ||
"documentation": "Link to documentation in header\n{{Identical|Documentation}}", | ||
"feedback": "Link to feedback in header\n{{Identical|Feedback}}", | ||
"leaderboard": "Link to a list of the top reviewers in header", | ||
"login": "Button label\n{{Identical|login}}", | ||
"logout": "Button label\n{{Identical|Logout}}", | ||
"header-loggedin": "Message to tell user who they are logged in as.\n Parameter: $1 - Wiki username.", | ||
"form-all": "Form radio button label - show all possible records", | ||
"form-open": "Form radio button label - show unreviewed records", | ||
"form-reviewed": "Form radio button label - show reviewed records", | ||
"form-mine": "Form radio button label - show records reviewed by logged in user", | ||
"form-drafts": "Form checkbox label - show records in draft namespace", | ||
"wikiprojects": "Title for an input box to select WikiProjects to search for - show ", | ||
"form-wikiprojects-placeholder": "Placeholder for an input box to select WikiProjects to search", | ||
"submit": "Form button label\n{{Identical|Submit}}", | ||
"page": "Table column header\n{{Identical|Page}}", | ||
"diff": "Table column header\n{{Identical|Diff}}", | ||
"editor": "Table column header\n{{Identical|Editor}}", | ||
"review": "Table column header", | ||
"review-fixed": "Button label to mark a record as fixed", | ||
"review-fixed-tooltip": "Button tooltip to show help text", | ||
"review-false": "Button label to mark a record as not fixed", | ||
"review-false-tooltip": "Button tooltip to show help text", | ||
"review-by": "Label to indicate which user reviewed a record", | ||
"history": "Link to the history page for a given page title\n{{Identical|History}}", | ||
"talk": "Link to the talk page for a given page title\n{{Identical|Talk}}", | ||
"contribs": "Link to the contributions history for a given page title\n{{Identical|Contributions}}", | ||
"record-editcount": "Label to indicate number of edits a user has made", | ||
"compare": "Button label to open a panel for text comparison between two pages", | ||
"record-ithenticate": "Button label for a button to go to the original plagiarism report generated by Turnitin", | ||
"record-url-text": "Label text to show amount of plagiarism.\n Parameters: $1 - Percentage of edit that was plagiarized.\n $2 - Number of words plagiarized.", | ||
"record-noeditor": "Column text shown to user when no editor was found in database for an edit", | ||
"record-noeditor-tooltip": "Tooltip for a text label, shown to editor to explain why no editor could be found", | ||
"record-ores": "Ores score for a record. \n Parameters: $1 - Decimal number indicating percentage score.", | ||
"article": "Label shown for a text box, showing an article text. \n{{Identical|Article}}", | ||
"compare-article-loading": "Temporary text shown to user while article text loads", | ||
"compare-source-loading": "Temporary text shown to user while copyvio text source loads", | ||
"footer-loadmore": "Label for a button to load more records.", | ||
"footer-nomore": "Label to indicate no more records in database.", | ||
"footer-broughtby": "Footer text to indicate author. \n Parameters: $1 - String. Name of the team (community tech).", | ||
"footer-commtech": "Footer text - name of team.", | ||
"footer-poweredby": "Footer text to highlight sources used for development. \n Parameters: $1 - String('Eranbot', which maintains the database) and $2 - String('Turnitin', the service used for plagiarism detection)", | ||
"source": "Footer link to source code for application", | ||
"phabricator": "Footer link to phabricator workboard for application", | ||
"footer-imageattr": "Footer link to open a pop up box to show attributions for images used in app", | ||
"lboard-title": "Page title for leaderboard page", | ||
"lboard-week": "Column title for number of records closed last week by each person (top 10 only)", | ||
"lboard-month": "Column title for number of records closed last month by each person (top 10 only)", | ||
"lboard-alltime": "Column title for the total number of records closed by each person (top 10 only)", | ||
"lboard-back": "Button text to go back to CopyPatrol from leaderboard page", | ||
"close": "Button text to close pop up box. \n{{Identical|Close}}", | ||
"imageattr-title": "Title for popup box to show image attributions", | ||
"imageattr-logo": "Title of logo, links to file.", | ||
"public-domain": "Text as part of the attributions box", | ||
"open-font-license": "Text as part of the attributions box", | ||
"imageattr-paragraph1": "Text as part of the attributions box. \n Parameters: $1, $2, $3, $4 - Strings: Links to the app logo and usernames & project names which helped create it. Username is gender neutral.", | ||
"imageattr-paragraph2": "Text as part of the attributions box. \n Parameters: $1, $2, $3 - Strings: Link to the font, it's creator and associated license.", | ||
"alert-testing": "Text shown as part of an alert on the test app instance, alerting users to use the actual instance instead", | ||
"js-unauthorized": "Alert text shown to user when they try to review records without being logged in", | ||
"js-dberror": "Alert shown to user when a database connection could not be made", | ||
"js-undo-own-only": "Alert shown to user when they try to undo other people's reviews", | ||
"js-unknown-error": "Alert shown to user when results could not be loaded, possibly due to connection issues, asking them to try again" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing is I would avoid including links and markup in the messages. E.g. you get rid of
footer-source
and instead just have"source": "Source"
and our HTML,<a href="https://github.com/wikimedia/PlagiabotWeb">{{ 'source'|message }}</a>
. The markup is not translatable and there's a chance someone might unintentionally break it.And for
footer-poweredby
you could use:Powered by $1 and $2
since EranBot and Turnitin are also not translatable. If they are, make a separate message forturnitin
then in our HTML:{{ 'footer-poweredby'|message | ( <a href="https://en.wikipedia.org/wiki/Wikipedia:Turnitin">{{ 'turnitin'|message }}</a> | <a href="https://en.wikipedia.org/wiki/User:EranBot">{{ 'EranBot'|message }}</a> }}
(this is pseudocode, not sure how SimpleI18n works)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it should be
https://github.com/wikimedia/CopyPatrol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. I also fixed some links in Image attribution modal. I didn't break it up into 12 messages but 8 instead.
The link in footer is
https://github.com/wikimedia/CopPatrol
only. Did you see otherwise anywhere?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, simpleI18n doesn't support the sort of markup you were suggesting above so I resorted to break out the text.