{"action":"created","issue":{"url":"https://api.github.com/repos/fisharebest/webtrees/issues/1013","repository_url":"https://api.github.com/repos/fisharebest/webtrees","labels_url":"https://api.github.com/repos/fisharebest/webtrees/issues/1013/labels{/name}","comments_url":"https://api.github.com/repos/fisharebest/webtrees/issues/1013/comments","events_url":"https://api.github.com/repos/fisharebest/webtrees/issues/1013/events","html_url":"https://github.com/fisharebest/webtrees/issues/1013","id":161086311,"number":1013,"title":"A minor change in Statistics, Own charts","user":{"login":"tunandras","id":15856891,"avatar_url":"https://avatars.githubusercontent.com/u/15856891?v=3","gravatar_id":"","url":"https://api.github.com/users/tunandras","html_url":"https://github.com/tunandras","followers_url":"https://api.github.com/users/tunandras/followers","following_url":"https://api.github.com/users/tunandras/following{/other_user}","gists_url":"https://api.github.com/users/tunandras/gists{/gist_id}","starred_url":"https://api.github.com/users/tunandras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunandras/subscriptions","organizations_url":"https://api.github.com/users/tunandras/orgs","repos_url":"https://api.github.com/users/tunandras/repos","events_url":"https://api.github.com/users/tunandras/events{/privacy}","received_events_url":"https://api.github.com/users/tunandras/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-19T18:51:36Z","updated_at":"2016-06-19T19:59:02Z","closed_at":null,"body":"In Statistics > Own charts tab > chart types from \"Age related to birth year\" to \"Number of children\".\r\n\r\nIs it possible to swap the word \"over\" and the last value--at the right end of the horizontal axis--if the selected language is Hungarian? The \"over 100\" is in Hungarian \"100 felett\".\r\n\r\nThe key is in file [statisticsplot.php](https://github.com/fisharebest/webtrees/blob/master/statisticsplot.php) (on line 788).\r\n\r\nHere is (probably not the best, but working) solution: if these five lines\r\n\r\n    if (WT_LOCALE !== 'hu') {\r\n        $xdata[$xmax]        = I18N::translate('over') . ' ' . $hulpar[$i - 1];\r\n    } else {\r\n        $xdata[$xmax]        = $hulpar[$i - 1] . ' ' . I18N::translate('over');\r\n    }\r\nreplace the original one:\r\n\r\n        $xdata[$xmax]        = I18N::translate('over') . ' ' . $hulpar[$i - 1];\r\n\r\nthan the English (or any other language) and Hungarian result is:\r\n\r\n![over_to_felett](https://cloud.githubusercontent.com/assets/15856891/16179182/6e6938aa-365e-11e6-903a-8ad203ab0887.png)\r\n\r\nIn my opinion a bit better solution would be to change the code as the lines are handled in the chart's legend (as the GEDCOM date localization). There the words and values are combined in strings, and the translator can decide the order in Weblate--as \"before %s\", \"after %s\", and \"between %s and %s\" is--somehow like this:\r\n\r\n        /* I18N: %s is the last value on the X axis */\r\n        $xdata[$xmax]        = I18N::translate('over %s', $hulpar[$i - 1]);\r\n\r\nMaybe there are other languages too, which also need the order change. What do you think?"},"comment":{"url":"https://api.github.com/repos/fisharebest/webtrees/issues/comments/227017154","html_url":"https://github.com/fisharebest/webtrees/issues/1013#issuecomment-227017154","issue_url":"https://api.github.com/repos/fisharebest/webtrees/issues/1013","id":227017154,"user":{"login":"fisharebest","id":2306088,"avatar_url":"https://avatars.githubusercontent.com/u/2306088?v=3","gravatar_id":"","url":"https://api.github.com/users/fisharebest","html_url":"https://github.com/fisharebest","followers_url":"https://api.github.com/users/fisharebest/followers","following_url":"https://api.github.com/users/fisharebest/following{/other_user}","gists_url":"https://api.github.com/users/fisharebest/gists{/gist_id}","starred_url":"https://api.github.com/users/fisharebest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fisharebest/subscriptions","organizations_url":"https://api.github.com/users/fisharebest/orgs","repos_url":"https://api.github.com/users/fisharebest/repos","events_url":"https://api.github.com/users/fisharebest/events{/privacy}","received_events_url":"https://api.github.com/users/fisharebest/received_events","type":"User","site_admin":false},"created_at":"2016-06-19T19:59:02Z","updated_at":"2016-06-19T19:59:02Z","body":"The solution is to use a placeholder.  e.g. \"over %s\""}}
{"actor":{"display_login":"fisharebest"}}