status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.91k stars 984 forks source link

Remove unused strings #8727

Closed annadanchenko closed 5 years ago

annadanchenko commented 5 years ago

Problem

The following strings are not used in the code anymore and should be removed from

Strings: {'no-hashtags-discovered-title', 'no-more-participants-available', 'and-you', 'wallet-transaction-fee', 'contacts-syncronized', 'faucet-error', 'currency-display-name-kyd', 'tribute-to-talk-sign-and-set-tribute', 'wallet-set-up-safe-transactions-title', 'add-existing-multiaccount', 'add-new-contact', 'currency-display-name-gyd', 'leave-confirmation', 'currency-display-name-bmd', 'removed-from-chat', 'device-to-device-warning-content', 'update-status', 'postponed', 'error-unable-to-get-transactions', 'leave-chat', 'search-chats', 'your-wallets', 'delete-group', 'status-not-sent', 'device-to-device-warning-title', 'mute-notifications', 'reorder-groups', 'status-not-sent-tap', 'signing-phrase-warning', 'transaction-moved-title', 'transactions-delete', 'error-cant-send-transaction-offline', 'no-statuses-found', 'available-participants', 'wallet-transaction-fee-details', 'delete-contact-confirmation', 'is-typing', 'create-new-multiaccount', 'wallet-set-up-confirm-description', 'move-to-internal-failure-message', 'status-failed', 'passcode-error', 'leave-group-chat', 'wallet-onboarding-description', 'delete-group-chat-confirmation', 'popular-tags', 'enter-dapp-url', 'wallet-onboarding-set-up', 'secure-your-assets', 'search-tags', 'wallets', 'pin-unblocked', 'add-new-network', 'status-delivered', 'currency-display-name-srd', 'multiaccount-not-listed', 'currency-display-name-mkd', 'unsigned-transaction-expired', 'wallet-deposit', 'enter-valid-public-key', 'suggestions-requests', 'search-for', 'leave-group-title', 'empty-topic', 'status-prompt', 'phone-significant', 'wallet-add-asset', 'existing-networks', 'edit-chats', 'keycard-applet-will-be-installed', 'other-multiaccounts', 'currency-display-name-ltl', 'secret-keys-confirmation-cancel', 'secret-keys-confirmation-confirm', 'transactions-unsigned-empty', 'no-multiaccount-on-card', 'switch-users', 'status-hardwallet-capitalized', 'edit-contacts', 'status-sent', 'delete-contact', 'invalid-phone', 'status-not-sent-without-tap', 'recover-access', 'wallet-set-up-signing-explainer', 'make-sure-you-trust-dapp', 'not-implemented', 'add-a-status', 'currency-display-name-yer', 'new-transaction', 'enter-pin-description', 'address-explication', 'currency-display-name-mnt', 'edit-network-config', 'request-qr-legend', 'no-pairing-on-device', 'transaction-moved-text', 'phone-number', 'not-specified', 'no-multiaccount-on-card-text', 'tribute-to-talk-you-can-leave-a-message', 'debug-enabled', 'edit-network-warning', 'suggestions-commands', 'intro-text-description', 'transactions-sign-later', 'mobile-network-use-mobile-details', 'chat-send-eth', 'faucet-success', 'no-statuses-discovered', 'phone-international', 'sign-later-text', 'here-is-your-signing-phrase', 'remove-from-contacts', 'fetching-messages', 'ens-names', 'ens-username-owned-continue', 'default-dapps-marketplaces', 'leave-public-chat', 'tribute-to-talk-message-placeholder', 'connection-problem', 'edit-group', 'phone-national', 'dapp-profile', 'default-dapps-social-utilities', 'error-processing-json', 'default-dapps-social-networks', 'no-statuses-discovered-body', 'transactions-sign-all', 'wallet-exchange', 'members-none', 'delete-group-confirmation', 'currency-display-name-nio', 'leave-group-chat-confirmation', 'wallet-address-from-clipboard', 'transactions-unsigned', 'wallet-backup-recovery-description', 'sign-later-title', 'process-json', 'multiaccount-not-listed-text', 'notifications-title', 'delete-chat-title', 'paste-json-as-text', 'view-transaction-details', 'existing-mailservers', 'you-will-need-this-code', 'delete-group-prompt', 'transactions-delete-content', 'status-seen', 'contact-already-added', 'choose-from-contacts', 'remove-from-group', 'view-my-wallet', 'wallet-set-up-confirm-title', 'default-dapps-fun-games', 'wallet-set-up-signing-explainer-warning', 'currency-display-name-sos', 'status-seen-by-everyone', 'already-have-multiaccount', 'wallet-choose-from-contacts', 'leave-group-action', 'wallet-send-token', 'syncing-disabled', 'incorrect-code', 'type-a-command', 'currency-display-name-lrd', 'currency-display-name-bzd', 'wallet-browse-photos', 'wallet-onboarding-title', 'search-chat', 'selected-dapps', 'request-feature', 'phone-number-required', 'default-dapps-media', 'begin-keycard-setup-confirmation-text', 'no-hashtags-discovered-body', 'specify-mailserver-address', 'manage-permissions', 'dont-allow', 'add-json-file', 'leave-group-confirmation', 'syncing-enabled', 'shake-your-phone', 'wallet-error', 'topic-format', 'error-cant-sign-message-offline', 'search-contacts', 'unknown-address', 'link-card', 'contacts-group-new-chat', 'wallet-set-up-title', 'reset-default', 'signing-message-phrase-description', 'currency-display-name-gmd', 'status-console', 'currency-display-name-lak', 'buy-with-snt', 'twelve-words-in-correct-order', 'transactions-filter-tokens', 'status-sending', 'default-dapps-exchanges', 'status-not-sent-click', 'specify-bootnode-address', 'empty-chat-description-console', 'tribute-to-talk-sample-text', 'received-invitation', 'delete-chat-action', 'pin-unblocked-description', 'enter-address', 'public-chat-user-count'}

Acceptance Criteria

Listed strings are not present in the listed files

Note

unused strings are found by the test test/appium/tests/atomic/test_translations.py

annadanchenko commented 5 years ago

closing until we make sure that autotest doesn't produce false positives

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 80.0 DAI (80.0 USD @ $1.0/DAI) attached to it.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 3 days, 2 hours from now. Please review their action plans below:

1) acolytec3 has been approved to start work.

1) Clone repository 2) Remove unused strings identified in bounty from all referenced locations 3)Re-run test-translations test to validate no unused strings are found. 2) mabenavid has applied to start work _(Funders only: approve worker | reject worker)_.

clone project from git, search all text appearances and remove them, create PR 3) sebastiantf has applied to start work _(Funders only: approve worker | reject worker)_.

  1. Clone this repo
  2. Search the whole 'translations' folder and i18n.cljs for the listed strings
  3. Find and Replace all occurrences of the strings from all files in the folder using VSCode

The work is already done. Waiting for approval to make PR 4) diegotorreslopez81 has applied to start work _(Funders only: approve worker | reject worker)_.

Hi! I'll check the words and I'll remove them :) 5) jessepinkman9900 has applied to start work _(Funders only: approve worker | reject worker)_.

This task is pretty straightforward. Should be done and merged to master in a couple of hours . 6) lplit has applied to start work _(Funders only: approve worker | reject worker)_.

A few ter's or sed's and it should be done 7) ghikio has applied to start work _(Funders only: approve worker | reject worker)_.

Instead of just removing the strings manually we can take a lil bit more of time and automate this process with a python script, this way we will reduce manual labor in the future 8) gilzon has applied to start work _(Funders only: approve worker | reject worker)_.

Ready to work on this and complete on time with quality. 9) alex-coding-c has applied to start work _(Funders only: approve worker | reject worker)_.

I am ready to start on this bounty. 10) syfon01 has applied to start work _(Funders only: approve worker | reject worker)_.

I'm ready to work and will search for those strings and then replace them 11) lightningsfury has applied to start work _(Funders only: approve worker | reject worker)_.

Make a quick little RegExp with JavaScript which will be used to remove the strings. Either with code or inside of a text editor/ 12) snezanasucurovic042 has applied to start work _(Funders only: approve worker | reject worker)_.

i did similar task in c# test for one remote work company. i think i could realise this task in a resonable time, perhaps using jQuery or other apps related to javascript. 13) simzar has applied to start work _(Funders only: approve worker | reject worker)_.

The files are .json, the keys to remove are given. JSON.parse the file, remove keys, JSON.stringify it back, run the tests to validate. 14) erkus19 has applied to start work _(Funders only: approve worker | reject worker)_.

  1. Clone repository
  2. Search for all unused strings
  3. Remove them
  4. Create PR 15) ndife has applied to start work _(Funders only: approve worker | reject worker)_.

Remove unused strings. I think it's pretty straightforward, can get it done in a few hours 16) sirwindfield has applied to start work _(Funders only: approve worker | reject worker)_.

This should be done fairly easily. The test script returns all strings that should be removed, so using its output a I would create small custom script that iterates over each translation file and removes the strings accordingly.

The task isn't too complex and would be a great start for me to better get a feeling of the workflow on Gitcoin :) 17) josprachi has applied to start work _(Funders only: approve worker | reject worker)_.

Iterate through all the files and filter them by keeping everything but the provided strings. 19) udujoel has applied to start work _(Funders only: approve worker | reject worker)_.

Search and read through, Remove unneeded specified strings, Verify PR Fast 20) arbreton has applied to start work _(Funders only: approve worker | reject worker)_.

I'm currently a Dapp Developer

After in depth research of unused strings, then determine which ones need to be deleted and finally removing them from the project 21) gpiemont has applied to start work _(Funders only: approve worker | reject worker)_.

for JSON file : read file / deserialize / remove keys / serialize / write file for Clojure file : read file / plain text substitution / write file 22) borxes has applied to start work _(Funders only: approve worker | reject worker)_.

Read the relevant json files, filter the entries against a list of unneeded string, write the resulting filtered json to the file. 23) sergejmueller has applied to start work _(Funders only: approve worker | reject worker)_.

I will write a Node script for cleaning strings. 24) tunght1991 has applied to start work _(Funders only: approve worker | reject worker)_.

i will go to each file .json and remove string language not used 25) juan-pieterse has applied to start work _(Funders only: approve worker | reject worker)_.

Plan is to write a nodejs script to remove the string PAIRS from the file, e.g. in the example of: "leave-group-chat", the whole line: "leave-group-chat": "Leave group chat", will be removed. 26) developerkumar has applied to start work _(Funders only: approve worker | reject worker)_.

I will write a script that will perform the following tasks,

  1. Take string to be removed as an input parameter.
  2. Now search for input string in given files i.e from which I have to remove the input string. And remove it.

This way each unused string will be removed from the mentioned files. 27) developerkumar has applied to start work _(Funders only: approve worker | reject worker)_.

I will write a script that will perform the following tasks,

  1. Take string to be removed as an input parameter.
  2. Now search for input string in given files i.e from which I have to remove the input string. And remove it.

This way each unused string will be removed from the mentioned files. 28) kitalee has applied to start work _(Funders only: approve worker | reject worker)_.

1) Clone repository 2) Search for all unused strings 3) Remove them and Test 29) dhayor01 has applied to start work _(Funders only: approve worker | reject worker)_.

Clone repository and remove the strings not needed

Learn more on the Gitcoin Issue Details page.

rachelhamlin commented 5 years ago

@acolytec3 still interested in this bounty? I've approved you - have a go if so!

acolytec3 commented 5 years ago

Awesome, will get to work on it.

On Tue, Sep 3, 2019, 6:43 AM Rachel Hamlin notifications@github.com wrote:

@acolytec3 https://github.com/acolytec3 still interested in this bounty? I've approved you - have a go if so!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/status-im/status-react/issues/8727?email_source=notifications&email_token=AEENFXGBC5KMBRCDHFT7YXDQHY5UPA5CNFSM4IKR4RDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5XZB5Q#issuecomment-527405302, or mute the thread https://github.com/notifications/unsubscribe-auth/AEENFXDYHHJRBL3ZZ2XJGSDQHY5UPANCNFSM4IKR4RDA .

rachelhamlin commented 5 years ago

@acolytec3 sweet - thanks! let us know if you need anything.

acolytec3 commented 5 years ago

@rachelhamlin Do I have to build the entire development environment to run the individual test that generated these error messages? The test fails to run when I just build a python virtual environment with pipenv and run the test with pytest. I can build out the whole environment if need be but felt like a lot of overhead to run a single (relatively simple test).

yenda commented 5 years ago

@acolytec3 seems like you are trying to run the e2e tests? Those are appium tests on Android emulator, you can't run that with just a python virtual env you need an android emulator as well, and they are ran by the CI anyway.

yenda commented 5 years ago

Currently the CI tests are failing because your branch is not rebased

acolytec3 commented 5 years ago

@yenda good to know, I'll have to rebase the PR and try it again. After I pulled in the translation changes that were pushed to develop last week, the PR started producing some TypeErrors for supported locales when I run the make test-auto that I'm not understanding

On Mon, Sep 9, 2019 at 7:40 AM yenda notifications@github.com wrote:

Currently the CI tests are failing because your branch is not rebased

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/status-im/status-react/issues/8727?email_source=notifications&email_token=AEENFXG5UHOPNX4VIUGH75LQIYY4RA5CNFSM4IKR4RDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6HHY7A#issuecomment-529431676, or mute the thread https://github.com/notifications/unsubscribe-auth/AEENFXBC6FJDSWTOFS6P5ZLQIYY4RANCNFSM4IKR4RDA .

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 80.0 DAI (80.0 USD @ $1.0/DAI) has been submitted by:

  1. @acolytec3

@StatusSceptre please take a look at the submitted work:


gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 80.0 DAI (80.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @acolytec3.