Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29636585: Issue 6171 - create CSV exporter and importer for translations (Closed)

Created:
Dec. 12, 2017, 11:19 a.m. by saroyanm
Modified:
Sept. 7, 2018, 2:54 p.m.
Visibility:
Public.

Description

Use CLI for information about how to use the script: node build/csv-export.js -h

Patch Set 1 : #

Total comments: 1

Patch Set 2 : Added the copyright header #

Total comments: 115

Patch Set 3 : Addressed Thomas's comments #

Total comments: 47

Patch Set 4 : Rebased #

Patch Set 5 : Addressed most of the comments #

Total comments: 56

Patch Set 6 : Moved the script into build directory and updated the Readme #

Total comments: 12

Patch Set 7 : Addressed Thomas comments #

Patch Set 8 : Removed mercurial commands #

Total comments: 16

Patch Set 9 : Addressed Thomas comments #

Patch Set 10 : fixed eslint errors #

Patch Set 11 : Use consistent naming and promisify fs.writefile #

Patch Set 12 : used disable-eslint comment #

Patch Set 13 : Do not allow repetitive filenames and Don't use promisify for our functions #

Total comments: 6

Patch Set 14 : Addressed Comments #

Total comments: 2

Patch Set 15 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+328 lines, -0 lines) Patch
M README.md View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download
A build/csv-export.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +309 lines, -0 lines 0 comments Download
M package.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 34
saroyanm
@Thomas this is ready for the review, let's have a look after the Christmas holidays. ...
Dec. 19, 2017, 7:48 p.m. (2017-12-19 19:48:24 UTC) #1
Thomas Greiner
This requires quite a significant amount of changes. One of the reasons for that is ...
Jan. 22, 2018, 7:49 p.m. (2018-01-22 19:49:55 UTC) #2
saroyanm
https://codereview.adblockplus.org/29636585/diff/29645625/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29645625/csv-export.js#newcode24 csv-export.js:24: let filesNames = []; // ex.: desktop-options.json On 2018/01/22 ...
Feb. 28, 2018, 8:48 p.m. (2018-02-28 20:48:33 UTC) #3
saroyanm
Thanks Thomas for detailed review, this is already good enough I think for the second ...
Feb. 28, 2018, 8:57 p.m. (2018-02-28 20:57:34 UTC) #4
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29645625/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29645625/csv-export.js#newcode27 csv-export.js:27: let outputFileName = "translations-{repo}-{hash}.csv"; On 2018/02/28 20:48:22, saroyanm wrote: ...
March 19, 2018, 6:28 p.m. (2018-03-19 18:28:05 UTC) #5
Thomas Greiner
Finished reviewing the remaining parts of the code I didn't get around to before earlier ...
March 19, 2018, 6:54 p.m. (2018-03-19 18:54:13 UTC) #6
saroyanm
https://codereview.adblockplus.org/29636585/diff/29711668/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29711668/csv-export.js#newcode2 csv-export.js:2: * This file is part of Adblock Plus <https://adblockplus.org/>, ...
April 26, 2018, 5:53 p.m. (2018-04-26 17:53:53 UTC) #7
saroyanm
This is ready for review. I did created two followup issues: * https://gitlab.com/eyeo/adblockplus/adblockplusui/issues/75 * https://gitlab.com/eyeo/adblockplus/adblockplusui/issues/74 ...
May 4, 2018, 1:51 p.m. (2018-05-04 13:51:12 UTC) #8
saroyanm
https://codereview.adblockplus.org/29636585/diff/29770564/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770564/build/csv-export.js#newcode207 build/csv-export.js:207: console.log(`Updated: ${filePath}`); console.log doesn't pass eslint -> Unexpected console ...
May 4, 2018, 1:56 p.m. (2018-05-04 13:56:28 UTC) #9
juliandoucette
Adding myself to reviewers for future reference.
May 7, 2018, 11:16 a.m. (2018-05-07 11:16:21 UTC) #10
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29711668/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29711668/csv-export.js#newcode58 csv-export.js:58: return Promise.all([readDir(path.join(localesDir, defaultLocale)), On 2018/05/04 13:51:08, saroyanm wrote: > ...
May 7, 2018, 3:16 p.m. (2018-05-07 15:16:39 UTC) #11
saroyanm
https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js#newcode31 csv-export.js:31: const readJsonPromised = promisify(readJson); On 2018/05/07 15:16:36, Thomas Greiner ...
May 15, 2018, 6:59 p.m. (2018-05-15 18:59:50 UTC) #12
saroyanm
https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js#newcode18 csv-export.js:18: /* globals require, process */ On 2018/05/07 15:16:33, Thomas ...
May 16, 2018, 5:06 p.m. (2018-05-16 17:06:37 UTC) #13
saroyanm
This is ready for review. CC: @wspee I have removed the logic that were using ...
May 17, 2018, 5:27 p.m. (2018-05-17 17:27:38 UTC) #14
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js#newcode29 csv-export.js:29: const readFile = promisify(fs.readFile); On 2018/05/16 17:06:33, saroyanm wrote: ...
May 22, 2018, 5:22 p.m. (2018-05-22 17:22:51 UTC) #15
wspee
On 2018/05/17 17:27:38, saroyanm wrote: > This is ready for review. > > > CC: ...
May 23, 2018, 12:39 p.m. (2018-05-23 12:39:00 UTC) #16
saroyanm
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode148 build/csv-export.js:148: if (locale == defaultLocale) I've changed this into if ...
May 24, 2018, 1:29 p.m. (2018-05-24 13:29:26 UTC) #17
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode148 build/csv-export.js:148: if (locale == defaultLocale) On 2018/05/24 13:29:26, saroyanm wrote: ...
May 24, 2018, 1:49 p.m. (2018-05-24 13:49:44 UTC) #18
saroyanm
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode172 build/csv-export.js:172: let sortedJSON = orderJSON(dataTreeObj[fileName][locale]); Sorting the Default locale produce ...
May 24, 2018, 3:29 p.m. (2018-05-24 15:29:54 UTC) #19
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode172 build/csv-export.js:172: let sortedJSON = orderJSON(dataTreeObj[fileName][locale]); On 2018/05/24 15:29:54, saroyanm wrote: ...
May 24, 2018, 3:46 p.m. (2018-05-24 15:46:47 UTC) #20
saroyanm
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode112 build/csv-export.js:112: return csvParser(fileObjects); I think there might a bug in ...
May 24, 2018, 4:40 p.m. (2018-05-24 16:40:03 UTC) #21
saroyanm
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode1 build/csv-export.js:1: /* In some stage of import/export This "\u00A0" special ...
May 24, 2018, 5:01 p.m. (2018-05-24 17:01:00 UTC) #22
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode1 build/csv-export.js:1: /* On 2018/05/24 17:00:59, saroyanm wrote: > In some ...
May 25, 2018, 10:23 a.m. (2018-05-25 10:23:29 UTC) #23
saroyanm
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode1 build/csv-export.js:1: /* On 2018/05/25 10:23:28, Thomas Greiner wrote: > On ...
May 28, 2018, 1:37 p.m. (2018-05-28 13:37:09 UTC) #24
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode1 build/csv-export.js:1: /* On 2018/05/28 13:37:08, saroyanm wrote: > I wonder ...
May 28, 2018, 5:12 p.m. (2018-05-28 17:12:47 UTC) #25
saroyanm
https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js#newcode79 csv-export.js:79: let dataTreeObj = fileObjects.reduce((accumulator, fileObject) => On 2018/05/22 17:22:48, ...
June 4, 2018, 3:18 p.m. (2018-06-04 15:18:00 UTC) #26
Thomas Greiner
I tried to clarify my comment. https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js#newcode79 csv-export.js:79: let dataTreeObj = ...
June 4, 2018, 4:58 p.m. (2018-06-04 16:58:22 UTC) #27
saroyanm
I think I have everything now. Thanks for the comments. https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js#newcode79 ...
June 5, 2018, 10:35 a.m. (2018-06-05 10:35:27 UTC) #28
saroyanm
Thanks Thomas. This is ready for the review. https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js File csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29770555/csv-export.js#newcode29 csv-export.js:29: const ...
June 5, 2018, 3:03 p.m. (2018-06-05 15:03:48 UTC) #29
Thomas Greiner
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode79 build/csv-export.js:79: locales = locales.filter((locale) => locale != defaultLocale).sort(); Is there ...
June 12, 2018, 2:50 p.m. (2018-06-12 14:50:43 UTC) #30
saroyanm
https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29784598/build/csv-export.js#newcode79 build/csv-export.js:79: locales = locales.filter((locale) => locale != defaultLocale).sort(); On 2018/06/12 ...
June 12, 2018, 3:22 p.m. (2018-06-12 15:22:50 UTC) #31
saroyanm
Thanks Thomas. New patch uploaded and ready for review. https://codereview.adblockplus.org/29636585/diff/29799613/build/csv-export.js File build/csv-export.js (right): https://codereview.adblockplus.org/29636585/diff/29799613/build/csv-export.js#newcode228 build/csv-export.js:228: ...
June 13, 2018, 3:36 p.m. (2018-06-13 15:36:27 UTC) #32
Thomas Greiner
LGTM, only added a small comment https://codereview.adblockplus.org/29636585/diff/29806562/package.json File package.json (right): https://codereview.adblockplus.org/29636585/diff/29806562/package.json#newcode33 package.json:33: "glob": "^7.1.2", Detail: ...
June 15, 2018, 12:07 p.m. (2018-06-15 12:07:21 UTC) #33
saroyanm
June 18, 2018, 2:50 p.m. (2018-06-18 14:50:52 UTC) #34
https://codereview.adblockplus.org/29636585/diff/29806562/package.json
File package.json (right):

https://codereview.adblockplus.org/29636585/diff/29806562/package.json#newcode33
package.json:33: "glob": "^7.1.2",
On 2018/06/15 12:07:20, Thomas Greiner wrote:
> Detail: The im-/exporter script isn't involved in building the extension so
> let's move those two dependencies to "devDependencies".

Good point, done.

Powered by Google App Engine
This is Rietveld