)]}'
{"tools/test-po.sh":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ebba6765deee8d89f09f22d88cd0cbdbb0d34629","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"if [ \"$1\" ]; then"},{"line_number":4,"context_line":"  FIND_DIR\u003d$1"},{"line_number":5,"context_line":"else"},{"line_number":6,"context_line":"  FIND_DIR\u003d\".\""},{"line_number":7,"context_line":"fi"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"EXIT\u003d0"},{"line_number":10,"context_line":"while read -r -d \u0027\u0027 FILE; do"}],"source_content_type":"text/x-sh","patch_set":3,"id":"9f436f4f_47595633","line":7,"range":{"start_line":3,"start_character":0,"end_line":7,"end_character":2},"updated":"2017-08-20 15:11:23.000000000","message":"As the shell convention, this would usually be:\n\n FIND_DIR\u003d${1:-\".\"}","commit_id":"e48cc76951369defe0e490e3460a897c5c467309"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ebba6765deee8d89f09f22d88cd0cbdbb0d34629","unresolved":false,"context_lines":[{"line_number":15,"context_line":"      EXIT\u003d$MSGFMT_EXIT"},{"line_number":16,"context_line":"    fi"},{"line_number":17,"context_line":"  fi"},{"line_number":18,"context_line":"done \u003c \u003c(find ${FIND_DIR} -type f \\( -name \u0027*.po\u0027 -o -name \u0027*.pot\u0027 \\) -print0)"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"if [ $EXIT !\u003d 0 ]; then"},{"line_number":21,"context_line":"  false"}],"source_content_type":"text/x-sh","patch_set":3,"id":"9f436f4f_47a7160d","line":18,"updated":"2017-08-20 15:11:23.000000000","message":"We usually use a pipe to pass the output of find.\n\n  find $FIND_DIR -type f \\( -name \u0027*.po\u0027 -o -name \u0027*.pot\u0027 \\) -print0 | \\\n  while read -r -d \u0027\u0027 FILE; do\n    msgfmt --check-format -o /dev/null \"$FILE\"\n  done\n\nIn addition, if you use \u0027set -e\u0027, you don\u0027t need to use MSGFMT_EXIT and the code below. The above my example would be enough then. This means the script will fail when a first error is detected. From the purpose of the script this is a sufficient behavior.\n\nAs a result, my suggested whole code would be:\n\n  #!/bin/bash\n  set -e\n  FIND_DIR\u003d${1:-\".\"}\n  find $FIND_DIR -type f \\( -name \u0027*.po\u0027 -o -name \u0027*.pot\u0027 \\) -print0 | \\\n  while read -r -d \u0027\u0027 FILE; do\n    msgfmt --check-format -o /dev/null \"$FILE\"\n  done\n\nThat\u0027s all.","commit_id":"e48cc76951369defe0e490e3460a897c5c467309"}],"tox.ini":[{"author":{"_account_id":14482,"name":"Ian Y. Choi","email":"ianyrchoi@gmail.com","username":"ianychoi"},"change_message_id":"b5ceb4a28c4ddb9c228e78078af22904e1a521d6","unresolved":false,"context_lines":[{"line_number":34,"context_line":"[testenv:pep8]"},{"line_number":35,"context_line":"commands \u003d"},{"line_number":36,"context_line":"  flake8"},{"line_number":37,"context_line":"  bash -c \"{toxinidir}/test-po.bash\""},{"line_number":38,"context_line":"  python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml"},{"line_number":39,"context_line":"  bash {toxinidir}/tools/check-zanata-users-list.sh"},{"line_number":40,"context_line":"whitelist_externals \u003d bash"}],"source_content_type":"text/x-properties","patch_set":1,"id":"9f436f4f_abf8ce7b","line":37,"range":{"start_line":37,"start_character":22,"end_line":37,"end_character":35},"updated":"2017-08-20 14:00:51.000000000","message":"Please move test-po.bash file to tools/test-po.sh","commit_id":"6e36b54c6fb4049c93a35d114cfa62cd8e1dd14c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"ebba6765deee8d89f09f22d88cd0cbdbb0d34629","unresolved":false,"context_lines":[{"line_number":34,"context_line":"[testenv:pep8]"},{"line_number":35,"context_line":"commands \u003d"},{"line_number":36,"context_line":"  flake8"},{"line_number":37,"context_line":"  bash -c \"{toxinidir}/tools/test-po.sh {toxinidir}\""},{"line_number":38,"context_line":"  python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml"},{"line_number":39,"context_line":"  bash {toxinidir}/tools/check-zanata-users-list.sh"},{"line_number":40,"context_line":"whitelist_externals \u003d bash"}],"source_content_type":"text/x-properties","patch_set":3,"id":"9f436f4f_a775a29a","line":37,"range":{"start_line":37,"start_character":2,"end_line":37,"end_character":52},"updated":"2017-08-20 15:11:23.000000000","message":"There is no need to use \u0027-c\u0027\n\n  bash {toxinidir}/tools/test-po.sh {toxinidir}\n\nlike L.39 below.","commit_id":"e48cc76951369defe0e490e3460a897c5c467309"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"86479d41f7d2379eccdc831209c6264cbfb41361","unresolved":false,"context_lines":[{"line_number":34,"context_line":"[testenv:pep8]"},{"line_number":35,"context_line":"commands \u003d"},{"line_number":36,"context_line":"  flake8"},{"line_number":37,"context_line":"  bash -c \"{toxinidir}/tools/test-po.sh {toxinidir}\""},{"line_number":38,"context_line":"  python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml"},{"line_number":39,"context_line":"  bash {toxinidir}/tools/check-zanata-users-list.sh"},{"line_number":40,"context_line":"whitelist_externals \u003d bash"}],"source_content_type":"text/x-properties","patch_set":3,"id":"9f436f4f_c7b2e649","line":37,"range":{"start_line":37,"start_character":2,"end_line":37,"end_character":52},"in_reply_to":"9f436f4f_a775a29a","updated":"2017-08-20 15:13:48.000000000","message":"In addition, I think check-po.sh looks better as filename as we already have two \"check*\" script in the pep8 target.","commit_id":"e48cc76951369defe0e490e3460a897c5c467309"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8c1344f509b3755ed9dfe6204d5399b67992138c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"[testenv:pep8]"},{"line_number":35,"context_line":"commands \u003d"},{"line_number":36,"context_line":"  flake8"},{"line_number":37,"context_line":"  bash -c \"{toxinidir}/tools/test-po.sh {toxinidir}\""},{"line_number":38,"context_line":"  python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml"},{"line_number":39,"context_line":"  bash {toxinidir}/tools/check-zanata-users-list.sh"},{"line_number":40,"context_line":"whitelist_externals \u003d bash"}],"source_content_type":"text/x-properties","patch_set":3,"id":"9f436f4f_07922ea0","line":37,"range":{"start_line":37,"start_character":2,"end_line":37,"end_character":52},"in_reply_to":"9f436f4f_c7b2e649","updated":"2017-08-20 15:17:16.000000000","message":"(it may beyond the scope of the patch) Using {toxinidir} as the target directory looks inappropriate because it search all PO/POT files under .tox directory. There is no need to check them. I think \"doc\" and \"glossary\" directories are enough. The minimum requirement is \"glossary\" because glossary PO/POT files are maintained manually now.","commit_id":"e48cc76951369defe0e490e3460a897c5c467309"}]}
