I'm going to present an issue regarding the strings in staging.busy.org. There are cases when the id of the used string does not match the string in the locale JSON files. It results in text that is translated but the translation is not visible on the site. ## VoteActionMessage.js |VoteActionMessage.js|en.json|text| |-|-|-| |user_upvoted_post|user_upvoted|"{username} upvoted"| |user_downvoted_post|user_downvoted|"{username} downvoted"| |user_unvoted_post|user_unvoted|"{username} unvoted"| |voting_weight|vote_weight|"Vote weight"| ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024607/oifbrxjbul9agqgliexe.png) ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024612/i6bkbzqqalhbgem7bkel.png) ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024617/jj0ycs8uufsuitrde37x.png) ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024932/ddod7sa287ymmbnmtvo7.png) You can see [here](https://github.com/busyorg/busy/blob/master/src/client/locales/cs.json) that the strings were translated to Czech. The mismatching IDs causes trouble and the strings would actually not be seen as translated. Another issue is that the messages with IDs in {upvoted, downvoted, unvoted} are capitalized although the text should have only the first letter in capital. ## Error401.js This file contains a message for the page warning the user that hey have to login to proceed. You can see it if you go to <staging.busy.org/wallet> while not logged in. |Error401.js|en.json| |-|-| |`@statics/need_login`|missing| |`@statics/here_link`|missing| |`@statics/homepage`|missing| You can see that I tried to fix this minor issue in a [PR](https://github.com/busyorg/busy/pull/1163) but Sekhmet also suggested another change that would require more knowledge. First new ids were suggested so that they are easier to recognize. |old ID| new ID| |-|-| |need_login|login_required| |homepage|homepage_link| |here_link|??| ![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1513028075/rvcslhiuro2b1w6rtfnv.png) ``` <p> <FormattedMessage id="@statics/need_login" defaultMessage="You need to login to use this feature, please" />{' '} <a href={SteemConnect.getLoginURL()}> <FormattedMessage id="login" defaultMessage="Login" /> </a> <br /> <FormattedMessage id="@statics/here_link" defaultMessage="Here's a link to the" /> <Link to="/"> <FormattedMessage id="@statics/homepage" defaultMessage="home page" /> </Link> . </p> ``` I had one solution in mind regarding no prior knowledge of JS or React. I changed the ids and merged some strings together in order to work with them easily. This, however, doesn't work well. ``` <FormattedMessage id="login_required" defaultMessage="You need to {login} to use this feature." values={{ login: <Link to={SteemConnect.getLoginURL()}>login</Link>, }} /> <br /> <FormattedMessage id="homepage_link" defaultMessage="Here's a link to the {home_page}." values={{ home_page: <Link to="/">home page</Link>, }} /> ``` To have the link embedded in the string, it should probably look like this. This is probably incorrect way of doing it but it is only a suggestion and my way of understanding the issue. Those sentences must be easy to manipulate so that they can be translated without difficulties. ``` <FormattedMessage id="login_required" defaultMessage="You need to <a href="{SteemConnect.getLoginURL()}">login</a> to use this feature." /> <br /> <FormattedMessage id="homepage_link" defaultMessage="Here's a link to the <a href="/">home page</a>." /> ``` <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@espoem/string-ids-in-the-site-do-not-match-ids-in-json-files">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
post_id | 20,145,372 | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
author | espoem | ||||||||||||||||||||||||||||||||||||||||||||||||
permlink | string-ids-in-the-site-do-not-match-ids-in-json-files | ||||||||||||||||||||||||||||||||||||||||||||||||
category | utopian-io | ||||||||||||||||||||||||||||||||||||||||||||||||
json_metadata | "{"type": "bug-hunting", "repository": {"id": 64382195, "watchers": 137, "events_url": "https://api.github.com/repos/busyorg/busy/events", "forks": 56, "name": "busy", "issues_url": "https://api.github.com/repos/busyorg/busy/issues{/number}", "trees_url": "https://api.github.com/repos/busyorg/busy/git/trees{/sha}", "fork": false, "git_url": "git://github.com/busyorg/busy.git", "assignees_url": "https://api.github.com/repos/busyorg/busy/assignees{/user}", "size": 60238, "owner": {"id": 25360286, "following_url": "https://api.github.com/users/busyorg/following{/other_user}", "starred_url": "https://api.github.com/users/busyorg/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/busyorg/subscriptions", "repos_url": "https://api.github.com/users/busyorg/repos", "login": "busyorg", "gists_url": "https://api.github.com/users/busyorg/gists{/gist_id}", "followers_url": "https://api.github.com/users/busyorg/followers", "received_events_url": "https://api.github.com/users/busyorg/received_events", "type": "Organization", "avatar_url": "https://avatars0.githubusercontent.com/u/25360286?v=4", "site_admin": false, "organizations_url": "https://api.github.com/users/busyorg/orgs", "gravatar_id": "", "events_url": "https://api.github.com/users/busyorg/events{/privacy}", "url": "https://api.github.com/users/busyorg", "html_url": "https://github.com/busyorg"}, "forks_count": 56, "git_refs_url": "https://api.github.com/repos/busyorg/busy/git/refs{/sha}", "blobs_url": "https://api.github.com/repos/busyorg/busy/git/blobs{/sha}", "pushed_at": "2017-12-11T21:11:20Z", "watchers_count": 137, "teams_url": "https://api.github.com/repos/busyorg/busy/teams", "comments_url": "https://api.github.com/repos/busyorg/busy/comments{/number}", "archived": false, "svn_url": "https://github.com/busyorg/busy", "merges_url": "https://api.github.com/repos/busyorg/busy/merges", "subscribers_url": "https://api.github.com/repos/busyorg/busy/subscribers", "issue_events_url": "https://api.github.com/repos/busyorg/busy/issues/events{/number}", "stargazers_url": "https://api.github.com/repos/busyorg/busy/stargazers", "mirror_url": null, "statuses_url": "https://api.github.com/repos/busyorg/busy/statuses/{sha}", "has_projects": true, "milestones_url": "https://api.github.com/repos/busyorg/busy/milestones{/number}", "description": "Blockchain-based social network where anyone can earn rewards \ud83d\ude80", "keys_url": "https://api.github.com/repos/busyorg/busy/keys{/key_id}", "open_issues": 69, "compare_url": "https://api.github.com/repos/busyorg/busy/compare/{base}...{head}", "ssh_url": "git@github.com:busyorg/busy.git", "license": {"name": "MIT License", "key": "mit", "url": "https://api.github.com/licenses/mit", "spdx_id": "MIT"}, "html_url": "https://github.com/busyorg/busy", "commits_url": "https://api.github.com/repos/busyorg/busy/commits{/sha}", "open_issues_count": 69, "stargazers_count": 137, "branches_url": "https://api.github.com/repos/busyorg/busy/branches{/branch}", "full_name": "busyorg/busy", "forks_url": "https://api.github.com/repos/busyorg/busy/forks", "score": 101.894325, "deployments_url": "https://api.github.com/repos/busyorg/busy/deployments", "contributors_url": "https://api.github.com/repos/busyorg/busy/contributors", "homepage": "https://busy.org/", "contents_url": "https://api.github.com/repos/busyorg/busy/contents/{+path}", "has_downloads": true, "collaborators_url": "https://api.github.com/repos/busyorg/busy/collaborators{/collaborator}", "created_at": "2016-07-28T09:27:04Z", "git_commits_url": "https://api.github.com/repos/busyorg/busy/git/commits{/sha}", "releases_url": "https://api.github.com/repos/busyorg/busy/releases{/id}", "private": false, "pulls_url": "https://api.github.com/repos/busyorg/busy/pulls{/number}", "git_tags_url": "https://api.github.com/repos/busyorg/busy/git/tags{/sha}", "notifications_url": "https://api.github.com/repos/busyorg/busy/notifications{?since,all,participating}", "language": "JavaScript", "updated_at": "2017-12-06T00:16:52Z", "has_wiki": true, "downloads_url": "https://api.github.com/repos/busyorg/busy/downloads", "hooks_url": "https://api.github.com/repos/busyorg/busy/hooks", "languages_url": "https://api.github.com/repos/busyorg/busy/languages", "default_branch": "master", "labels_url": "https://api.github.com/repos/busyorg/busy/labels{/name}", "url": "https://api.github.com/repos/busyorg/busy", "has_pages": false, "tags_url": "https://api.github.com/repos/busyorg/busy/tags", "clone_url": "https://github.com/busyorg/busy.git", "archive_url": "https://api.github.com/repos/busyorg/busy/{archive_format}{/ref}", "has_issues": true, "issue_comment_url": "https://api.github.com/repos/busyorg/busy/issues/comments{/number}", "subscription_url": "https://api.github.com/repos/busyorg/busy/subscription"}, "pullRequests": [], "format": "markdown", "image": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024607/oifbrxjbul9agqgliexe.png"], "links": ["https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024607/oifbrxjbul9agqgliexe.png", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024612/i6bkbzqqalhbgem7bkel.png", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024617/jj0ycs8uufsuitrde37x.png", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1513024932/ddod7sa287ymmbnmtvo7.png", "https://github.com/busyorg/busy/blob/master/src/client/locales/cs.json", "https://github.com/busyorg/busy/pull/1163", "https://res.cloudinary.com/hpiynhbhq/image/upload/v1513028075/rvcslhiuro2b1w6rtfnv.png"], "app": "utopian/1.0.0", "platform": "github", "tags": ["utopian-io", "busy", "czech", "translation", "bug"], "community": "utopian", "users": ["statics"]}" | ||||||||||||||||||||||||||||||||||||||||||||||||
created | 2017-12-11 21:40:21 | ||||||||||||||||||||||||||||||||||||||||||||||||
last_update | 2017-12-11 21:40:21 | ||||||||||||||||||||||||||||||||||||||||||||||||
depth | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||
children | 3 | ||||||||||||||||||||||||||||||||||||||||||||||||
net_rshares | 5,948,242,227,678 | ||||||||||||||||||||||||||||||||||||||||||||||||
last_payout | 2017-12-18 21:40:21 | ||||||||||||||||||||||||||||||||||||||||||||||||
cashout_time | 1969-12-31 23:59:59 | ||||||||||||||||||||||||||||||||||||||||||||||||
total_payout_value | 17.600 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
curator_payout_value | 6.306 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
pending_payout_value | 0.000 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
promoted | 0.000 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
body_length | 3,819 | ||||||||||||||||||||||||||||||||||||||||||||||||
author_reputation | 59,186,440,518,630 | ||||||||||||||||||||||||||||||||||||||||||||||||
root_title | "String IDs in the site do not match IDs in JSON files" | ||||||||||||||||||||||||||||||||||||||||||||||||
beneficiaries |
| ||||||||||||||||||||||||||||||||||||||||||||||||
max_accepted_payout | 1,000,000.000 SBD | ||||||||||||||||||||||||||||||||||||||||||||||||
percent_steem_dollars | 10,000 | ||||||||||||||||||||||||||||||||||||||||||||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
abh12345 | 0 | 35,303,280,484 | 5% | ||
trueart | 0 | 15,180,654,757 | 100% | ||
jznsamuel | 0 | 27,487,417,430 | 25% | ||
afriaulia | 0 | 0 | 100% | ||
mkt | 0 | 42,909,801,961 | 100% | ||
flauwy | 0 | 195,221,919,415 | 50% | ||
simnrodrguez | 0 | 45,625,146,200 | 50% | ||
luigi-tecnologo | 0 | 499,377,428 | 2% | ||
davidmendel | 0 | 17,708,196,943 | 100% | ||
jjprac | 0 | 1,439,259,164 | 100% | ||
drigweeu | 0 | 4,947,168,705 | 100% | ||
leir | 0 | 1,225,504,622 | 20% | ||
stoodkev | 0 | 7,465,740,059 | 10% | ||
jefpatat | 0 | 7,633,938,611 | 100% | ||
mooncryption | 0 | 21,323,044,424 | 50% | ||
ansonoxy | 0 | 17,480,767,332 | 50% | ||
jamesbarraclough | 0 | 43,742,200,845 | 100% | ||
primetimesports | 0 | 141,057,081 | 0.02% | ||
espoem | 0 | 43,033,831,185 | 100% | ||
vandadream | 0 | 1,835,744,778 | 100% | ||
daijia | 0 | 4,113,461,243 | 50% | ||
idlebright | 0 | 282,280,516 | 50% | ||
utopian-io | 0 | 5,395,235,118,409 | 3.42% | ||
moorkedi | 0 | 2,737,805,689 | 50% | ||
kslo | 0 | 3,581,656,611 | 100% | ||
ekushya | 0 | 742,038,266 | 50% | ||
adhew | 0 | 133,436,286 | 10% | ||
raj1511 | 0 | 75,723,087 | 50% | ||
reyha | 0 | 2,672,037,212 | 40% | ||
maphics | 0 | 962,029,305 | 50% | ||
adfizz | 0 | 324,966,619 | 50% | ||
utopian-1up | 0 | 6,587,169,275 | 50% | ||
arcjen02 | 0 | 590,453,736 | 50% | ||
superoo7 | 0 | 0 | 100% | ||
not4 | 0 | 0 | 100% |
Thank you for the contribution. It has been approved. You can contact us on [Discord](https://discord.gg/UCvqCsx). **[[utopian-moderator]](https://utopian.io/moderators)**
post_id | 20,145,605 |
---|---|
author | drigweeu |
permlink | re-espoem-string-ids-in-the-site-do-not-match-ids-in-json-files-20171211t214341366z |
category | utopian-io |
json_metadata | "{"app": "busy/1.0.0", "community": "busy", "tags": ["utopian-io"]}" |
created | 2017-12-11 21:44:06 |
last_update | 2017-12-11 21:44:06 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2017-12-18 21:44:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 172 |
author_reputation | 9,697,653,591,082 |
root_title | "String IDs in the site do not match IDs in JSON files" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
<div class="pull-left"> ![1up-logo.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1512204274/pbwgsxljk7f8ql2slbs9.png) </div> <div class="text-justify"> <br> You've got a <code>1UP</code> from the @utopian-1up curation trail. __24 Utopians__ have upvoted your quality contribution to the open source community. <code>[Join](https://steemit.com/utopian-io/@flauwy/steemy-ep-46-how-to-create-and-follow-a-curation-trail-with-steemauto) 1UP for better posts and high curation rewards.</code> _1UP is neither organized nor endorsed by Utopian.io!_ </div>
post_id | 20,178,062 |
---|---|
author | utopian-1up |
permlink | re-espoem-string-ids-in-the-site-do-not-match-ids-in-json-files-20171212t054319544z |
category | utopian-io |
json_metadata | "{"app": "busy/2.1.0", "community": "busy", "tags": ["utopian-io"]}" |
created | 2017-12-12 05:43:27 |
last_update | 2017-12-12 05:43:27 |
depth | 1 |
children | 0 |
net_rshares | 88,393,947,494 |
last_payout | 2017-12-19 05:43:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.304 SBD |
curator_payout_value | 0.098 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 570 |
author_reputation | 2,326,305,067,153 |
root_title | "String IDs in the site do not match IDs in JSON files" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
flauwy | 0 | 40,390,741,947 | 10% | ||
thinkkniht | 0 | 48,003,205,547 | 100% |
### Hey @espoem I am @utopian-io. I have just upvoted you! #### Achievements - You have less than 500 followers. Just gave you a gift to help you succeed! - Seems like you contribute quite often. AMAZING! #### Suggestions - Contribute more often to get higher and higher rewards. I wish to see you often! - Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck! #### Get Noticed! - Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions! #### Community-Driven Witness! I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER! - <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a> - <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a> - Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a> [![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses) **Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
post_id | 20,267,166 |
---|---|
author | utopian-io |
permlink | re-espoem-string-ids-in-the-site-do-not-match-ids-in-json-files-20171213t000936429z |
category | utopian-io |
json_metadata | "{"app": "utopian/1.0.0", "community": "utopian", "tags": ["utopian-io"]}" |
created | 2017-12-13 00:09:36 |
last_update | 2017-12-13 00:09:36 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2017-12-20 00:09:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,504 |
author_reputation | 152,913,012,544,965 |
root_title | "String IDs in the site do not match IDs in JSON files" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |