{"action":"created","issue":{"url":"https://api.github.com/repos/WordImpress/Give/issues/2655","repository_url":"https://api.github.com/repos/WordImpress/Give","labels_url":"https://api.github.com/repos/WordImpress/Give/issues/2655/labels{/name}","comments_url":"https://api.github.com/repos/WordImpress/Give/issues/2655/comments","events_url":"https://api.github.com/repos/WordImpress/Give/issues/2655/events","html_url":"https://github.com/WordImpress/Give/issues/2655","id":288262779,"number":2655,"title":"inconsistent define localised js variable key","user":{"login":"raftaar1191","id":22215595,"avatar_url":"https://avatars3.githubusercontent.com/u/22215595?v=4","gravatar_id":"","url":"https://api.github.com/users/raftaar1191","html_url":"https://github.com/raftaar1191","followers_url":"https://api.github.com/users/raftaar1191/followers","following_url":"https://api.github.com/users/raftaar1191/following{/other_user}","gists_url":"https://api.github.com/users/raftaar1191/gists{/gist_id}","starred_url":"https://api.github.com/users/raftaar1191/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raftaar1191/subscriptions","organizations_url":"https://api.github.com/users/raftaar1191/orgs","repos_url":"https://api.github.com/users/raftaar1191/repos","events_url":"https://api.github.com/users/raftaar1191/events{/privacy}","received_events_url":"https://api.github.com/users/raftaar1191/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-12T22:20:18Z","updated_at":"2018-03-12T05:08:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Issue Overview\r\nThere is an inconsistency in localized variable key\r\nExample: https://github.com/WordImpress/Give/blob/release/2.0/includes/scripts.php#L326 and https://github.com/WordImpress/Give/blob/release/2.0/includes/scripts.php#L48\r\n\r\nHere you can see that both display give_get_price_decimals function value but the key is diff\r\n\r\n## Expected Behavior\r\nMust be same \r\n\r\n## Current Behavior\r\nNot same\r\n\r\n## Related Issues and/or PRs\r\nhttps://github.com/WordImpress/Give/issues/339\r\nhttps://github.com/WordImpress/Give-Fee-Recovery/issues/157\r\n\r\n## Todos\r\n- [x] Tests\r\n- [x] Documentation\r\n\r\n## WordPress Environment\r\n<details>\r\n```\r\n### WordPress Environment ###\r\n\r\nHome URL: http://give.local\r\nSite URL: http://give.local\r\nWP Version: 4.9.1\r\nWP Multisite: –\r\nWP Memory Limit: 256 MB\r\nWP Debug Mode: ✔\r\nWP Cron: ✔\r\nLanguage: en_US\r\nPermalink Structure: /%year%/%monthnum%/%day%/%postname%/\r\nShow on Front: posts\r\nTable Prefix Length: 3\r\nTable Prefix Status: Acceptable\r\nAdmin AJAX: Accessible\r\nRegistered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, refunded, failed, revoked, cancelled, abandoned, processing, preapproval\r\n\r\n### Server Environment ###\r\n\r\nHosting Provider: DBH: localhost, SRV: give.local\r\nTLS Connection: \r\nTLS Connection: \r\nServer Info: nginx/1.10.1\r\nPHP Version: 7.0.3\r\nPHP Post Max Size: 1,000 MB\r\nPHP Time Limit: 900\r\nPHP Max Input Vars: 3000\r\nPHP Max Upload Size: 1,000 MB\r\ncURL Version: ❌ 7.38.0, OpenSSL/1.0.1t - We recommend a minimum cURL version of 7.40.\r\nSUHOSIN Installed: –\r\nMySQL Version: ❌ 5.5.55 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements\r\nDefault Timezone is UTC: ✔\r\nfsockopen/cURL: ✔\r\nSoapClient: ✔\r\nDOMDocument: ✔\r\ngzip: ✔\r\nGD Graphics Library: ✔\r\nMultibyte String: ✔\r\nRemote Post: ✔\r\nRemote Get: ✔\r\n\r\n### Give Configuration ###\r\n\r\nGive Version: 2.0.0\r\nGive Cache: Enabled\r\nDatabase Updates: All DB Updates Completed.\r\nGive Cache: Enabled\r\nGive Cache: ✔New Donation✔Donation Receipt✔New Offline Donation✔Offline Donation Instructions✔New Donor Registration✔Donor Register✔Email access\r\nUpgraded From: –\r\nTest Mode: Enabled\r\nCurrency Code: USD\r\nCurrency Position: Before\r\nDecimal Separator: .\r\nThousands Separator: ,\r\nSuccess Page: http://give.local/donation-confirmation/\r\nFailure Page: http://give.local/donation-failed/\r\nDonation History Page: http://give.local/donation-history/\r\nGive Forms Slug: /donations/\r\nEnabled Payment Gateways: Test Donation, Offline Donation\r\nDefault Payment Gateway: Test Donation\r\nPayPal IPN Verification: Enabled\r\nPayPal IPN Notifications: N/A\r\nAdmin Email Notifications: Disabled\r\nDonor Email Access: Enabled\r\n\r\n### Session Configuration ###\r\n\r\nGive Use Sessions: Enabled\r\nSession: Disabled\r\n\r\n### Active Give Add-ons ###\r\n\r\nGive - Fee Recovery: ❌ Unlicensed – by WordImpress – 1.3.7\r\nGive - Manual Donations: ❌ Unlicensed – by WordImpress – 1.2.2\r\n\r\n### Other Active Plugins ###\r\n\r\n\r\n### Inactive Plugins ###\r\n\r\nBraintree For WooCommerce Free: by Payment Plugins, support@paymentplugins.com – 2.6.20\r\nDuplicate Post: by Enrico Battocchi – 3.2.1\r\nGive - 2Checkout Gateway: by WordImpress – 1.0.2\r\nGive - Authorize.net Gateway: by WordImpress – 1.3.2\r\nGive - AWeber: by WordImpress – 1.0.2\r\nGive - Braintree Gateway: by WordImpress – 1.1.1\r\nGive - CCAvenue Gateway: by WordImpress – 1.0\r\nGive - ConvertKit: by WordImpress – 1.0.1\r\nGive - CSV Toolbox: by WordImpress – 1.0\r\nGive - Display Donors: by WordImpress, LLC – 1.0\r\nGive - Dwolla Gateway: by WordImpress – 1.1.2\r\nGive - Email Reports: by WordImpress – 1.0.2\r\nGive - Form Countdown: by WordImpress – 1.0\r\nGive - Form Field Manager: by WordImpress – 1.2.4\r\nGive - Gift Aid: by WordImpress – 1.0.0\r\nGive - Google Analytics Donation Tracking: by WordImpress – 1.1.1\r\nGive - iATS Payment Solutions: by WordImpress – 1.0.1\r\nGive - MailChimp: by WordImpress – 1.3.7\r\nGive - Paymill Gateway: by WordImpress – 1.1\r\nGive - PDF Receipts: by WordImpress – 2.2.2\r\nGive - Recurring Donations: by WordImpress – 1.5.4\r\nGive - Stripe Gateway: by WordImpress – 1.5.2\r\nGive - Tributes: by WordImpress – 1.3.4\r\nMailChimp for WordPress: by ibericode – 4.1.13\r\nWooCommerce: by Automattic – 3.2.6\r\nWooCommerce PayPal Express Checkout Gateway: by WooCommerce – 1.5.0\r\nWooCommerce PayPal Powered by Braintree Gateway: by WooCommerce – 2.0.4\r\n\r\n### Active MU Plugins ###\r\n\r\nLocal by Flywheel Relative URL (for Live Links): by Flywheel – 1.0\r\n\r\n### Theme ###\r\n\r\nName: Twenty Seventeen\r\nVersion: 1.4\r\nAuthor URL: https://wordpress.org/\r\nChild Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme\r\n\r\n```\r\n</details>"},"comment":{"url":"https://api.github.com/repos/WordImpress/Give/issues/comments/372195092","html_url":"https://github.com/WordImpress/Give/issues/2655#issuecomment-372195092","issue_url":"https://api.github.com/repos/WordImpress/Give/issues/2655","id":372195092,"user":{"login":"raftaar1191","id":22215595,"avatar_url":"https://avatars3.githubusercontent.com/u/22215595?v=4","gravatar_id":"","url":"https://api.github.com/users/raftaar1191","html_url":"https://github.com/raftaar1191","followers_url":"https://api.github.com/users/raftaar1191/followers","following_url":"https://api.github.com/users/raftaar1191/following{/other_user}","gists_url":"https://api.github.com/users/raftaar1191/gists{/gist_id}","starred_url":"https://api.github.com/users/raftaar1191/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raftaar1191/subscriptions","organizations_url":"https://api.github.com/users/raftaar1191/orgs","repos_url":"https://api.github.com/users/raftaar1191/repos","events_url":"https://api.github.com/users/raftaar1191/events{/privacy}","received_events_url":"https://api.github.com/users/raftaar1191/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T05:08:47Z","updated_at":"2018-03-12T05:08:47Z","author_association":"CONTRIBUTOR","body":"The localized of the variable key in inconsistent in Give Backend and Frontend.\r\nExample for give_get_price_decimals() function in backend the key is [`currency_decimals `](https://github.com/WordImpress/Give/blob/release/2.0.7/includes/scripts.php#L324) and for frontend the key is [`number_decimals `](https://github.com/WordImpress/Give/blob/release/2.0.7/includes/scripts.php#L48). This key should be same for both frontend and backend variable that is being localized.\r\n\r\n\r\nWe should create a common function and pass this all value into it so that variable key will be consistent and also there will less repetition of code"}}
{"actor":{"display_login":"raftaar1191"}}