{"action":"created","comment":{"url":"https://api.github.com/repos/omegat-org/omegat/pulls/comments/218270817","pull_request_review_id":156170273,"id":218270817,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODI3MDgxNw==","diff_hunk":"@@ -762,8 +762,8 @@ public static synchronized void initSegmentation() {\n         }\n         didInitSegmentation = true;\n \n-        File srxFile = new File(StaticUtils.getConfigDir(), SRX.CONF_SENTSEG);\n-        SRX s = SRX.loadSRX(srxFile);\n+        File srxDir = new File(StaticUtils.getConfigDir());\n+        SRX s = SRX.loadSRX(srxDir); // may read SRX or CONF","path":"src/org/omegat/util/Preferences.java","position":19,"original_position":19,"commit_id":"10e0720e1e45e731073f75fe15066464d2488f4c","original_commit_id":"0a14024e771f79264946f417e8f36a83cece9afb","user":{"login":"amake","id":2172537,"node_id":"MDQ6VXNlcjIxNzI1Mzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2172537?v=4","gravatar_id":"","url":"https://api.github.com/users/amake","html_url":"https://github.com/amake","followers_url":"https://api.github.com/users/amake/followers","following_url":"https://api.github.com/users/amake/following{/other_user}","gists_url":"https://api.github.com/users/amake/gists{/gist_id}","starred_url":"https://api.github.com/users/amake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amake/subscriptions","organizations_url":"https://api.github.com/users/amake/orgs","repos_url":"https://api.github.com/users/amake/repos","events_url":"https://api.github.com/users/amake/events{/privacy}","received_events_url":"https://api.github.com/users/amake/received_events","type":"User","site_admin":false},"body":"The class `SRX` predates any support for the actual SRX XML serialization format, so I think the best way to understand it is as a synonym for \"segmentation\".\r\n\r\nSince `loadSRX` is a method on the class `SRX` and it returns an instance of `SRX`, I think having \"SRX\" in the method name is fine. The caller need not know or care about what the underlying serialization format was. However it's also a bit redundant; a good compromise would be to simply name it `loadFromDir` since the call will be `SRX.loadFromDir()` and thus obvious what we are loading.\r\n\r\nI think the `SRX` class should probably be renamed to `Segmentation` or `SegmentationRules` or something like that.","created_at":"2018-09-18T00:44:17Z","updated_at":"2018-09-18T00:44:17Z","html_url":"https://github.com/omegat-org/omegat/pull/24#discussion_r218270817","pull_request_url":"https://api.github.com/repos/omegat-org/omegat/pulls/24","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/omegat-org/omegat/pulls/comments/218270817"},"html":{"href":"https://github.com/omegat-org/omegat/pull/24#discussion_r218270817"},"pull_request":{"href":"https://api.github.com/repos/omegat-org/omegat/pulls/24"}},"in_reply_to_id":208557926},"pull_request":{"url":"https://api.github.com/repos/omegat-org/omegat/pulls/24","id":197362869,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MzYyODY5","html_url":"https://github.com/omegat-org/omegat/pull/24","diff_url":"https://github.com/omegat-org/omegat/pull/24.diff","patch_url":"https://github.com/omegat-org/omegat/pull/24.patch","issue_url":"https://api.github.com/repos/omegat-org/omegat/issues/24","number":24,"state":"open","locked":false,"title":"Can read SRX format instead of CONF","user":{"login":"t-cordonnier","id":36186159,"node_id":"MDQ6VXNlcjM2MTg2MTU5","avatar_url":"https://avatars0.githubusercontent.com/u/36186159?v=4","gravatar_id":"","url":"https://api.github.com/users/t-cordonnier","html_url":"https://github.com/t-cordonnier","followers_url":"https://api.github.com/users/t-cordonnier/followers","following_url":"https://api.github.com/users/t-cordonnier/following{/other_user}","gists_url":"https://api.github.com/users/t-cordonnier/gists{/gist_id}","starred_url":"https://api.github.com/users/t-cordonnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-cordonnier/subscriptions","organizations_url":"https://api.github.com/users/t-cordonnier/orgs","repos_url":"https://api.github.com/users/t-cordonnier/repos","events_url":"https://api.github.com/users/t-cordonnier/events{/privacy}","received_events_url":"https://api.github.com/users/t-cordonnier/received_events","type":"User","site_admin":false},"body":"SRX format support\r\n\r\nAfter discussion:\r\nIf CONF file is present and SRX absent, convert it. Next time, OmegaT 4 will use the SRX (while CONF is kept for older versions, but not updated anymore)\r\nRule is valid for global config directory as well as for project-specific segmentation rules. \r\n\r\nLast patch adds support for cascade attribute. This was not needed in the past, since you only used SRX for default rules. But now, if a user copies as segmentation.srx a file coming from another tool, this is required for full compatibility.","created_at":"2018-06-26T09:46:05Z","updated_at":"2018-09-18T00:44:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0d686eab800f31b20430d40827b41182e93abe6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/omegat-org/omegat/pulls/24/commits","review_comments_url":"https://api.github.com/repos/omegat-org/omegat/pulls/24/comments","review_comment_url":"https://api.github.com/repos/omegat-org/omegat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/omegat-org/omegat/issues/24/comments","statuses_url":"https://api.github.com/repos/omegat-org/omegat/statuses/10e0720e1e45e731073f75fe15066464d2488f4c","head":{"label":"t-cordonnier:master","ref":"master","sha":"10e0720e1e45e731073f75fe15066464d2488f4c","user":{"login":"t-cordonnier","id":36186159,"node_id":"MDQ6VXNlcjM2MTg2MTU5","avatar_url":"https://avatars0.githubusercontent.com/u/36186159?v=4","gravatar_id":"","url":"https://api.github.com/users/t-cordonnier","html_url":"https://github.com/t-cordonnier","followers_url":"https://api.github.com/users/t-cordonnier/followers","following_url":"https://api.github.com/users/t-cordonnier/following{/other_user}","gists_url":"https://api.github.com/users/t-cordonnier/gists{/gist_id}","starred_url":"https://api.github.com/users/t-cordonnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-cordonnier/subscriptions","organizations_url":"https://api.github.com/users/t-cordonnier/orgs","repos_url":"https://api.github.com/users/t-cordonnier/repos","events_url":"https://api.github.com/users/t-cordonnier/events{/privacy}","received_events_url":"https://api.github.com/users/t-cordonnier/received_events","type":"User","site_admin":false},"repo":{"id":138712967,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3MTI5Njc=","name":"omegat","full_name":"t-cordonnier/omegat","private":false,"owner":{"login":"t-cordonnier","id":36186159,"node_id":"MDQ6VXNlcjM2MTg2MTU5","avatar_url":"https://avatars0.githubusercontent.com/u/36186159?v=4","gravatar_id":"","url":"https://api.github.com/users/t-cordonnier","html_url":"https://github.com/t-cordonnier","followers_url":"https://api.github.com/users/t-cordonnier/followers","following_url":"https://api.github.com/users/t-cordonnier/following{/other_user}","gists_url":"https://api.github.com/users/t-cordonnier/gists{/gist_id}","starred_url":"https://api.github.com/users/t-cordonnier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-cordonnier/subscriptions","organizations_url":"https://api.github.com/users/t-cordonnier/orgs","repos_url":"https://api.github.com/users/t-cordonnier/repos","events_url":"https://api.github.com/users/t-cordonnier/events{/privacy}","received_events_url":"https://api.github.com/users/t-cordonnier/received_events","type":"User","site_admin":false},"html_url":"https://github.com/t-cordonnier/omegat","description":"Mirror of official OmegaT repo","fork":true,"url":"https://api.github.com/repos/t-cordonnier/omegat","forks_url":"https://api.github.com/repos/t-cordonnier/omegat/forks","keys_url":"https://api.github.com/repos/t-cordonnier/omegat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/t-cordonnier/omegat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/t-cordonnier/omegat/teams","hooks_url":"https://api.github.com/repos/t-cordonnier/omegat/hooks","issue_events_url":"https://api.github.com/repos/t-cordonnier/omegat/issues/events{/number}","events_url":"https://api.github.com/repos/t-cordonnier/omegat/events","assignees_url":"https://api.github.com/repos/t-cordonnier/omegat/assignees{/user}","branches_url":"https://api.github.com/repos/t-cordonnier/omegat/branches{/branch}","tags_url":"https://api.github.com/repos/t-cordonnier/omegat/tags","blobs_url":"https://api.github.com/repos/t-cordonnier/omegat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/t-cordonnier/omegat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/t-cordonnier/omegat/git/refs{/sha}","trees_url":"https://api.github.com/repos/t-cordonnier/omegat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/t-cordonnier/omegat/statuses/{sha}","languages_url":"https://api.github.com/repos/t-cordonnier/omegat/languages","stargazers_url":"https://api.github.com/repos/t-cordonnier/omegat/stargazers","contributors_url":"https://api.github.com/repos/t-cordonnier/omegat/contributors","subscribers_url":"https://api.github.com/repos/t-cordonnier/omegat/subscribers","subscription_url":"https://api.github.com/repos/t-cordonnier/omegat/subscription","commits_url":"https://api.github.com/repos/t-cordonnier/omegat/commits{/sha}","git_commits_url":"https://api.github.com/repos/t-cordonnier/omegat/git/commits{/sha}","comments_url":"https://api.github.com/repos/t-cordonnier/omegat/comments{/number}","issue_comment_url":"https://api.github.com/repos/t-cordonnier/omegat/issues/comments{/number}","contents_url":"https://api.github.com/repos/t-cordonnier/omegat/contents/{+path}","compare_url":"https://api.github.com/repos/t-cordonnier/omegat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/t-cordonnier/omegat/merges","archive_url":"https://api.github.com/repos/t-cordonnier/omegat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/t-cordonnier/omegat/downloads","issues_url":"https://api.github.com/repos/t-cordonnier/omegat/issues{/number}","pulls_url":"https://api.github.com/repos/t-cordonnier/omegat/pulls{/number}","milestones_url":"https://api.github.com/repos/t-cordonnier/omegat/milestones{/number}","notifications_url":"https://api.github.com/repos/t-cordonnier/omegat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/t-cordonnier/omegat/labels{/name}","releases_url":"https://api.github.com/repos/t-cordonnier/omegat/releases{/id}","deployments_url":"https://api.github.com/repos/t-cordonnier/omegat/deployments","created_at":"2018-06-26T09:07:49Z","updated_at":"2018-08-23T13:08:07Z","pushed_at":"2018-08-23T13:08:05Z","git_url":"git://github.com/t-cordonnier/omegat.git","ssh_url":"git@github.com:t-cordonnier/omegat.git","clone_url":"https://github.com/t-cordonnier/omegat.git","svn_url":"https://github.com/t-cordonnier/omegat","homepage":"http://www.omegat.org","size":451407,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"omegat-org:master","ref":"master","sha":"a2b2d84f2aa7043eb790e9155b733bbdf95c5695","user":{"login":"omegat-org","id":6554408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NTQ0MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/6554408?v=4","gravatar_id":"","url":"https://api.github.com/users/omegat-org","html_url":"https://github.com/omegat-org","followers_url":"https://api.github.com/users/omegat-org/followers","following_url":"https://api.github.com/users/omegat-org/following{/other_user}","gists_url":"https://api.github.com/users/omegat-org/gists{/gist_id}","starred_url":"https://api.github.com/users/omegat-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omegat-org/subscriptions","organizations_url":"https://api.github.com/users/omegat-org/orgs","repos_url":"https://api.github.com/users/omegat-org/repos","events_url":"https://api.github.com/users/omegat-org/events{/privacy}","received_events_url":"https://api.github.com/users/omegat-org/received_events","type":"Organization","site_admin":false},"repo":{"id":45658500,"node_id":"MDEwOlJlcG9zaXRvcnk0NTY1ODUwMA==","name":"omegat","full_name":"omegat-org/omegat","private":false,"owner":{"login":"omegat-org","id":6554408,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NTQ0MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/6554408?v=4","gravatar_id":"","url":"https://api.github.com/users/omegat-org","html_url":"https://github.com/omegat-org","followers_url":"https://api.github.com/users/omegat-org/followers","following_url":"https://api.github.com/users/omegat-org/following{/other_user}","gists_url":"https://api.github.com/users/omegat-org/gists{/gist_id}","starred_url":"https://api.github.com/users/omegat-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omegat-org/subscriptions","organizations_url":"https://api.github.com/users/omegat-org/orgs","repos_url":"https://api.github.com/users/omegat-org/repos","events_url":"https://api.github.com/users/omegat-org/events{/privacy}","received_events_url":"https://api.github.com/users/omegat-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/omegat-org/omegat","description":"Mirror of official OmegaT repo","fork":false,"url":"https://api.github.com/repos/omegat-org/omegat","forks_url":"https://api.github.com/repos/omegat-org/omegat/forks","keys_url":"https://api.github.com/repos/omegat-org/omegat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omegat-org/omegat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omegat-org/omegat/teams","hooks_url":"https://api.github.com/repos/omegat-org/omegat/hooks","issue_events_url":"https://api.github.com/repos/omegat-org/omegat/issues/events{/number}","events_url":"https://api.github.com/repos/omegat-org/omegat/events","assignees_url":"https://api.github.com/repos/omegat-org/omegat/assignees{/user}","branches_url":"https://api.github.com/repos/omegat-org/omegat/branches{/branch}","tags_url":"https://api.github.com/repos/omegat-org/omegat/tags","blobs_url":"https://api.github.com/repos/omegat-org/omegat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omegat-org/omegat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omegat-org/omegat/git/refs{/sha}","trees_url":"https://api.github.com/repos/omegat-org/omegat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omegat-org/omegat/statuses/{sha}","languages_url":"https://api.github.com/repos/omegat-org/omegat/languages","stargazers_url":"https://api.github.com/repos/omegat-org/omegat/stargazers","contributors_url":"https://api.github.com/repos/omegat-org/omegat/contributors","subscribers_url":"https://api.github.com/repos/omegat-org/omegat/subscribers","subscription_url":"https://api.github.com/repos/omegat-org/omegat/subscription","commits_url":"https://api.github.com/repos/omegat-org/omegat/commits{/sha}","git_commits_url":"https://api.github.com/repos/omegat-org/omegat/git/commits{/sha}","comments_url":"https://api.github.com/repos/omegat-org/omegat/comments{/number}","issue_comment_url":"https://api.github.com/repos/omegat-org/omegat/issues/comments{/number}","contents_url":"https://api.github.com/repos/omegat-org/omegat/contents/{+path}","compare_url":"https://api.github.com/repos/omegat-org/omegat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omegat-org/omegat/merges","archive_url":"https://api.github.com/repos/omegat-org/omegat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omegat-org/omegat/downloads","issues_url":"https://api.github.com/repos/omegat-org/omegat/issues{/number}","pulls_url":"https://api.github.com/repos/omegat-org/omegat/pulls{/number}","milestones_url":"https://api.github.com/repos/omegat-org/omegat/milestones{/number}","notifications_url":"https://api.github.com/repos/omegat-org/omegat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omegat-org/omegat/labels{/name}","releases_url":"https://api.github.com/repos/omegat-org/omegat/releases{/id}","deployments_url":"https://api.github.com/repos/omegat-org/omegat/deployments","created_at":"2015-11-06T04:08:11Z","updated_at":"2018-09-14T04:21:42Z","pushed_at":"2018-09-17T16:10:47Z","git_url":"git://github.com/omegat-org/omegat.git","ssh_url":"git@github.com:omegat-org/omegat.git","clone_url":"https://github.com/omegat-org/omegat.git","svn_url":"https://github.com/omegat-org/omegat","homepage":"http://www.omegat.org","size":451492,"stargazers_count":77,"watchers_count":77,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":28,"open_issues":4,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/omegat-org/omegat/pulls/24"},"html":{"href":"https://github.com/omegat-org/omegat/pull/24"},"issue":{"href":"https://api.github.com/repos/omegat-org/omegat/issues/24"},"comments":{"href":"https://api.github.com/repos/omegat-org/omegat/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/omegat-org/omegat/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/omegat-org/omegat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/omegat-org/omegat/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/omegat-org/omegat/statuses/10e0720e1e45e731073f75fe15066464d2488f4c"}},"author_association":"NONE"}}
{"actor":{"display_login":"amake"}}