Description
Describe the bug
When setting up data sources, the data source type is hardcoded and is always "tweets" instead of the correct data source type.
Where was the bug observed
Personal test deployment: https://lgbthistoryswuk.ushahidi.io/views/map
To Reproduce
Steps to reproduce the behavior:
- Go to a deployment you have admin access to
- Log in as 'an admin'
- Click on 'settings'
- Scroll down to 'data sources'
- Choose 'email', or any of the SMS data sources
- Toggle on 'Accept survey submissions from this source'
- Toggle on 'Import to survey'
- In the text that says 'Choose what should be assigned to each survey field
Each of the survey's fields are listed below. Choose the data from your tweets that you'd like to use to populate each of those fields.'
Expected behavior
The data source type shown in the description should match the one the user is looking at.
It should read
- For the Twitter data source: Each of the survey's fields are listed below. Choose the data from Twitter that you'd like to use to populate each of those fields.'
- For the Email data source: Each of the survey's fields are listed below. Choose the data from Email that you'd like to use to populate each of those fields.'
.. etc ...
Is there a workaround? What is it.
No
Screenshots
URL / Environment where this happened
Any ushahidi.io or testing environment with Ushahidi V3 or V4
Desktop Hardware Details (please complete the following information):
- Applies to any OS
- Applies to any browser
Working on this issue
- The repository for this change is https://github.com/ushahidi/platform-client. Start here https://docs.ushahidi.com/platform-developer-documentation/getting-started if you have not set up the Ushahidi client before. Notice that you only need to install the platform-client (no need to set up the API for this) as long as you connect it to a live ushahidi.io or Ushahidi testing deployment.
Implementation notes
-
Fix in https://github.com/ushahidi/platform-client repo
-
Hint 💡 The file with all the language keys can be found here: https://github.com/ushahidi/platform-client/tree/develop/app/common/locales/en.json
-
When you are done, 🔀 Start a Pull Request. There are two ways how you can start a pull request:
-
If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.
-
You can also edit files directly in your browser and open a pull request from there.
-
-
🏁 When done Ask in comments for a review :)
Changes required (first timers only)
- in the en.json file, look for the key "choose_survey_field_desc" and replace its value with
"Each of the survey's fields are listed below. Choose the data from {{datasource_type}} that you'd like to use to populate each of those fields.",
- in the datasources.html file, look for the p with the translation key "survey.choose_survey_field_desc" and replace that
with
<p translate-values="{datasource_type: provider.name}" translate="survey.choose_survey_field_desc">Each of the survey's fields are listed below. Choose the data from your tweets that you'd like to use to populate each of those fields.</p>
Ping @rowasc if you need help with this issue!