Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Add t() translation mark to i18nable strings and update translations #1593

Merged
merged 3 commits into from
Sep 21, 2018

Conversation

jespino
Copy link
Member

@jespino jespino commented Aug 21, 2018

Summary

I added a mark for every single string that needs to be translate and
isn't directly in a localizeMessage, FormattedMessage or other
similar block.

After that I used the mmjstool to extract the i18n strings in the code.

Ticket Link

MM-11273

Checklist

  • Ran make check-style to check for style errors (required for all pull requests)
  • Ran make test to ensure unit and component tests passed
  • Includes text changes and localization file (.../i18n/en.json) updates

@jespino jespino requested a review from enahum August 21, 2018 13:33
@jespino jespino requested a review from jwilander August 21, 2018 13:36
@jespino jespino added the 2: Dev Review Requires review by a core commiter label Aug 21, 2018
@@ -153,7 +153,7 @@ export default class Root extends React.Component {

/*eslint-disable */
if (segmentKey != null && segmentKey !== '' && this.props.diagnosticsEnabled) {
!function(){var analytics=global.window.analytics=global.window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http:https://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1";
!function(){var analytics=global.window.analytics=global.window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(...args){var e=Array.prototype.slice.call(args);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http:https://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changed because the acorn parser doesn't likes the arguments keyword.

@amyblais amyblais added this to the v5.3.0 milestone Aug 21, 2018
Copy link
Contributor

@enahum enahum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the mobile PR do not merge until the tooling are configured to handle this change

@enahum enahum added the Do Not Merge Should not be merged until this label is removed label Aug 22, 2018
@enahum
Copy link
Contributor

enahum commented Aug 22, 2018

Rebase needed

@jwilander jwilander added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Aug 22, 2018
@jespino
Copy link
Member Author

jespino commented Aug 23, 2018

Rebased.

@hmhealey
Copy link
Member

@jespino What's the plan for making sure this merges 100% correctly? Should we hold merging PRs while you update it and make sure there are no conflicts? I was just reviewing a PR that adds translation strings, so I don't know if it's safe to merge that yet

@jespino
Copy link
Member Author

jespino commented Aug 28, 2018

It is not safe to merge it directly. I going to rebase it properly (taking into account changes between the last rebase and the current base). Basically I'll go through the changes one by one, reviewing that all introduced strings are tagged or automatically extracted.

We won't merge it until the next release-branch cut, so we can merge into master and give it as much time as possible to test it properly in pre-release.

@jasonblais jasonblais modified the milestones: v5.3.0, v5.4.0 Aug 30, 2018
@hmhealey hmhealey added Do Not Merge/Awaiting Next Release To be merged with the next release (e.g. API documentation updates) and removed 4: Reviews Complete All reviewers have approved the pull request labels Aug 31, 2018
@jasonblais jasonblais removed the Do Not Merge/Awaiting Next Release To be merged with the next release (e.g. API documentation updates) label Sep 4, 2018
@jespino jespino force-pushed the i18n-extract branch 5 times, most recently from 67fadd5 to 281551c Compare September 21, 2018 14:14
@enahum enahum added 4: Reviews Complete All reviewers have approved the pull request and removed Do Not Merge Should not be merged until this label is removed labels Sep 21, 2018
@enahum enahum merged commit 9493076 into mattermost:master Sep 21, 2018
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Sep 21, 2018
@lindalumitchell lindalumitchell added the Tests/Not Needed Does not require new release tests label Oct 3, 2018
fincha pushed a commit to fincha/mattermost-webapp that referenced this pull request Oct 21, 2018
…attermost#1593)

* Add t() translation mark to i18nable strings and update translations

* Add 'Search Gfycat' string translation

* More translation fixes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
7 participants