{"action":"opened","number":169,"pull_request":{"url":"https://api.github.com/repos/audreyt/ethercalc/pulls/169","id":30256552,"html_url":"https://github.com/audreyt/ethercalc/pull/169","diff_url":"https://github.com/audreyt/ethercalc/pull/169.diff","patch_url":"https://github.com/audreyt/ethercalc/pull/169.patch","issue_url":"https://api.github.com/repos/audreyt/ethercalc/issues/169","number":169,"state":"open","locked":false,"title":"Load localized strings from json files.","user":{"login":"cbrunet","id":25658,"avatar_url":"https://avatars.githubusercontent.com/u/25658?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrunet","html_url":"https://github.com/cbrunet","followers_url":"https://api.github.com/users/cbrunet/followers","following_url":"https://api.github.com/users/cbrunet/following{/other_user}","gists_url":"https://api.github.com/users/cbrunet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrunet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrunet/subscriptions","organizations_url":"https://api.github.com/users/cbrunet/orgs","repos_url":"https://api.github.com/users/cbrunet/repos","events_url":"https://api.github.com/users/cbrunet/events{/privacy}","received_events_url":"https://api.github.com/users/cbrunet/received_events","type":"User","site_admin":false},"body":"It try to load strings from the localized file. If it fails, it loads strings from en.json.\r\n\r\nThe advantage is it does not have to read strings twice (once for default values, then once for localized values). The drawback is that if a string is not found in the localized file, there is no fallback. Also, since strings are in json files, there is not way to add comments.\r\n\r\nI put it in index.html, and I used jquery, since it was already included. Maybe it would be better to put the script inside socialcalcconstants.js . However, I was not sure if jquery could be used there. \r\n\r\nAll comments are welcome.","created_at":"2015-03-02T03:28:57Z","updated_at":"2015-03-02T03:28:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/audreyt/ethercalc/pulls/169/commits","review_comments_url":"https://api.github.com/repos/audreyt/ethercalc/pulls/169/comments","review_comment_url":"https://api.github.com/repos/audreyt/ethercalc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/audreyt/ethercalc/issues/169/comments","statuses_url":"https://api.github.com/repos/audreyt/ethercalc/statuses/9c10aec091f18face1154d765348826173ef4e1e","head":{"label":"cbrunet:l10n","ref":"l10n","sha":"9c10aec091f18face1154d765348826173ef4e1e","user":{"login":"cbrunet","id":25658,"avatar_url":"https://avatars.githubusercontent.com/u/25658?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrunet","html_url":"https://github.com/cbrunet","followers_url":"https://api.github.com/users/cbrunet/followers","following_url":"https://api.github.com/users/cbrunet/following{/other_user}","gists_url":"https://api.github.com/users/cbrunet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrunet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrunet/subscriptions","organizations_url":"https://api.github.com/users/cbrunet/orgs","repos_url":"https://api.github.com/users/cbrunet/repos","events_url":"https://api.github.com/users/cbrunet/events{/privacy}","received_events_url":"https://api.github.com/users/cbrunet/received_events","type":"User","site_admin":false},"repo":{"id":31519270,"name":"ethercalc","full_name":"cbrunet/ethercalc","owner":{"login":"cbrunet","id":25658,"avatar_url":"https://avatars.githubusercontent.com/u/25658?v=3","gravatar_id":"","url":"https://api.github.com/users/cbrunet","html_url":"https://github.com/cbrunet","followers_url":"https://api.github.com/users/cbrunet/followers","following_url":"https://api.github.com/users/cbrunet/following{/other_user}","gists_url":"https://api.github.com/users/cbrunet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrunet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrunet/subscriptions","organizations_url":"https://api.github.com/users/cbrunet/orgs","repos_url":"https://api.github.com/users/cbrunet/repos","events_url":"https://api.github.com/users/cbrunet/events{/privacy}","received_events_url":"https://api.github.com/users/cbrunet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbrunet/ethercalc","description":"Node.js port of Multi-user SocialCalc","fork":true,"url":"https://api.github.com/repos/cbrunet/ethercalc","forks_url":"https://api.github.com/repos/cbrunet/ethercalc/forks","keys_url":"https://api.github.com/repos/cbrunet/ethercalc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbrunet/ethercalc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbrunet/ethercalc/teams","hooks_url":"https://api.github.com/repos/cbrunet/ethercalc/hooks","issue_events_url":"https://api.github.com/repos/cbrunet/ethercalc/issues/events{/number}","events_url":"https://api.github.com/repos/cbrunet/ethercalc/events","assignees_url":"https://api.github.com/repos/cbrunet/ethercalc/assignees{/user}","branches_url":"https://api.github.com/repos/cbrunet/ethercalc/branches{/branch}","tags_url":"https://api.github.com/repos/cbrunet/ethercalc/tags","blobs_url":"https://api.github.com/repos/cbrunet/ethercalc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbrunet/ethercalc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbrunet/ethercalc/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbrunet/ethercalc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbrunet/ethercalc/statuses/{sha}","languages_url":"https://api.github.com/repos/cbrunet/ethercalc/languages","stargazers_url":"https://api.github.com/repos/cbrunet/ethercalc/stargazers","contributors_url":"https://api.github.com/repos/cbrunet/ethercalc/contributors","subscribers_url":"https://api.github.com/repos/cbrunet/ethercalc/subscribers","subscription_url":"https://api.github.com/repos/cbrunet/ethercalc/subscription","commits_url":"https://api.github.com/repos/cbrunet/ethercalc/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbrunet/ethercalc/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbrunet/ethercalc/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbrunet/ethercalc/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbrunet/ethercalc/contents/{+path}","compare_url":"https://api.github.com/repos/cbrunet/ethercalc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbrunet/ethercalc/merges","archive_url":"https://api.github.com/repos/cbrunet/ethercalc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbrunet/ethercalc/downloads","issues_url":"https://api.github.com/repos/cbrunet/ethercalc/issues{/number}","pulls_url":"https://api.github.com/repos/cbrunet/ethercalc/pulls{/number}","milestones_url":"https://api.github.com/repos/cbrunet/ethercalc/milestones{/number}","notifications_url":"https://api.github.com/repos/cbrunet/ethercalc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbrunet/ethercalc/labels{/name}","releases_url":"https://api.github.com/repos/cbrunet/ethercalc/releases{/id}","created_at":"2015-03-02T02:08:08Z","updated_at":"2015-03-02T02:08:09Z","pushed_at":"2015-03-02T03:19:45Z","git_url":"git://github.com/cbrunet/ethercalc.git","ssh_url":"git@github.com:cbrunet/ethercalc.git","clone_url":"https://github.com/cbrunet/ethercalc.git","svn_url":"https://github.com/cbrunet/ethercalc","homepage":"http://ethercalc.net/","size":6288,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"audreyt:master","ref":"master","sha":"82199e293c93db0d27777e892a6e143fc92fd3f1","user":{"login":"audreyt","id":20723,"avatar_url":"https://avatars.githubusercontent.com/u/20723?v=3","gravatar_id":"","url":"https://api.github.com/users/audreyt","html_url":"https://github.com/audreyt","followers_url":"https://api.github.com/users/audreyt/followers","following_url":"https://api.github.com/users/audreyt/following{/other_user}","gists_url":"https://api.github.com/users/audreyt/gists{/gist_id}","starred_url":"https://api.github.com/users/audreyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/audreyt/subscriptions","organizations_url":"https://api.github.com/users/audreyt/orgs","repos_url":"https://api.github.com/users/audreyt/repos","events_url":"https://api.github.com/users/audreyt/events{/privacy}","received_events_url":"https://api.github.com/users/audreyt/received_events","type":"User","site_admin":false},"repo":{"id":2237981,"name":"ethercalc","full_name":"audreyt/ethercalc","owner":{"login":"audreyt","id":20723,"avatar_url":"https://avatars.githubusercontent.com/u/20723?v=3","gravatar_id":"","url":"https://api.github.com/users/audreyt","html_url":"https://github.com/audreyt","followers_url":"https://api.github.com/users/audreyt/followers","following_url":"https://api.github.com/users/audreyt/following{/other_user}","gists_url":"https://api.github.com/users/audreyt/gists{/gist_id}","starred_url":"https://api.github.com/users/audreyt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/audreyt/subscriptions","organizations_url":"https://api.github.com/users/audreyt/orgs","repos_url":"https://api.github.com/users/audreyt/repos","events_url":"https://api.github.com/users/audreyt/events{/privacy}","received_events_url":"https://api.github.com/users/audreyt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/audreyt/ethercalc","description":"Node.js port of Multi-user SocialCalc","fork":false,"url":"https://api.github.com/repos/audreyt/ethercalc","forks_url":"https://api.github.com/repos/audreyt/ethercalc/forks","keys_url":"https://api.github.com/repos/audreyt/ethercalc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/audreyt/ethercalc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/audreyt/ethercalc/teams","hooks_url":"https://api.github.com/repos/audreyt/ethercalc/hooks","issue_events_url":"https://api.github.com/repos/audreyt/ethercalc/issues/events{/number}","events_url":"https://api.github.com/repos/audreyt/ethercalc/events","assignees_url":"https://api.github.com/repos/audreyt/ethercalc/assignees{/user}","branches_url":"https://api.github.com/repos/audreyt/ethercalc/branches{/branch}","tags_url":"https://api.github.com/repos/audreyt/ethercalc/tags","blobs_url":"https://api.github.com/repos/audreyt/ethercalc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/audreyt/ethercalc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/audreyt/ethercalc/git/refs{/sha}","trees_url":"https://api.github.com/repos/audreyt/ethercalc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/audreyt/ethercalc/statuses/{sha}","languages_url":"https://api.github.com/repos/audreyt/ethercalc/languages","stargazers_url":"https://api.github.com/repos/audreyt/ethercalc/stargazers","contributors_url":"https://api.github.com/repos/audreyt/ethercalc/contributors","subscribers_url":"https://api.github.com/repos/audreyt/ethercalc/subscribers","subscription_url":"https://api.github.com/repos/audreyt/ethercalc/subscription","commits_url":"https://api.github.com/repos/audreyt/ethercalc/commits{/sha}","git_commits_url":"https://api.github.com/repos/audreyt/ethercalc/git/commits{/sha}","comments_url":"https://api.github.com/repos/audreyt/ethercalc/comments{/number}","issue_comment_url":"https://api.github.com/repos/audreyt/ethercalc/issues/comments{/number}","contents_url":"https://api.github.com/repos/audreyt/ethercalc/contents/{+path}","compare_url":"https://api.github.com/repos/audreyt/ethercalc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/audreyt/ethercalc/merges","archive_url":"https://api.github.com/repos/audreyt/ethercalc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/audreyt/ethercalc/downloads","issues_url":"https://api.github.com/repos/audreyt/ethercalc/issues{/number}","pulls_url":"https://api.github.com/repos/audreyt/ethercalc/pulls{/number}","milestones_url":"https://api.github.com/repos/audreyt/ethercalc/milestones{/number}","notifications_url":"https://api.github.com/repos/audreyt/ethercalc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/audreyt/ethercalc/labels{/name}","releases_url":"https://api.github.com/repos/audreyt/ethercalc/releases{/id}","created_at":"2011-08-20T06:10:56Z","updated_at":"2015-03-01T16:19:18Z","pushed_at":"2015-02-17T05:28:11Z","git_url":"git://github.com/audreyt/ethercalc.git","ssh_url":"git@github.com:audreyt/ethercalc.git","clone_url":"https://github.com/audreyt/ethercalc.git","svn_url":"https://github.com/audreyt/ethercalc","homepage":"http://ethercalc.net/","size":6288,"stargazers_count":1046,"watchers_count":1046,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":166,"mirror_url":null,"open_issues_count":47,"forks":166,"open_issues":47,"watchers":1046,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/audreyt/ethercalc/pulls/169"},"html":{"href":"https://github.com/audreyt/ethercalc/pull/169"},"issue":{"href":"https://api.github.com/repos/audreyt/ethercalc/issues/169"},"comments":{"href":"https://api.github.com/repos/audreyt/ethercalc/issues/169/comments"},"review_comments":{"href":"https://api.github.com/repos/audreyt/ethercalc/pulls/169/comments"},"review_comment":{"href":"https://api.github.com/repos/audreyt/ethercalc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/audreyt/ethercalc/pulls/169/commits"},"statuses":{"href":"https://api.github.com/repos/audreyt/ethercalc/statuses/9c10aec091f18face1154d765348826173ef4e1e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":16,"deletions":795,"changed_files":3}}