Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrange string resources based on screens #3384

Open
yashraj-01 opened this issue Jun 28, 2021 · 18 comments
Open

Arrange string resources based on screens #3384

yashraj-01 opened this issue Jun 28, 2021 · 18 comments
Assignees
Labels
enhancement End user-perceivable enhancements. good first issue This item is good for new contributors to make their pull request. Impact: Low Low perceived user impact (e.g. edge cases). Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@yashraj-01
Copy link
Contributor

yashraj-01 commented Jun 28, 2021

Describe the bug

Currently string resources are not organised correctly and are scattered in strings.xml file.

This should be fixed by following these points:

  1. Make sure that each string is getting used in one specific view only. For example Home is part of multiple views like Navigation Drawer, Home-Toolbar. So for this we should have separate strings for both.
  2. All strings related to one activity/fragment should be kept together by mentioning the activity name on top of the strings in a comment. Example: <!-- ProfileResetPinActivity -->
  3. All activities/fragment sections should be in correct alphabetical order based on activity/fragment name. (The actual strings name are not required to be in alphabetical order but the comments should be in alphabetical order). Example:
<!-- HomeActivity -->
<string name="random_string_related_to_home">ABC</string>
<!-- ProfileResetPinActivity -->
<string name="random_string_related_to_profile_resent_pin">ABC</string>
<string name="random_string_related_to_profile_resent_pin_2">XYZ</string>

Arrange strings file as per below criteria:

Screen/Toolbar Titles
Used in manifest label, toolbar title and activity label test.
Pattern: activity_name_activity_title

Example: administrator_controls_activty_title

App Content Strings
Pattern: activity_name_view_component_type

administrator_controls_activity_profile_management_label
administrator_controls_activity_account_actions_label
administrator_controls_activity_logout_item_text
administrator_controls_activity_app_version_item

Shared Strings
Pattern: view_component_description

reading_text_size_item_text_small
reading_text_size_item_medium

Test Strings
Pattern: test_file_name_view_component_type

Dialogs
Pattern: dialog_name_view_component_type

Grouping Pattern:

<!-- AdministratorControlActivity -->
….
….
<!-- GeneralAvailabilityUpgradeNoticeDialogFragment -->
…..
<!-- ProgressDatabaseFullDialog -->

@yashraj-01 yashraj-01 added Type: Improvement Priority: Important This work item is really important to complete for its milestone, but it can be scoped out. good first issue This item is good for new contributors to make their pull request. labels Jun 28, 2021
@yashraj-01
Copy link
Contributor Author

cc: @anandwana001 @rt4914

@yashraj-01 yashraj-01 changed the title Arrange activity titles in strings.xml under one section named <!-- Activity Titles --> Arrange activity titles for activitties in app/home package in strings.xml under one section named <!-- Activity Titles --> Jun 28, 2021
@rt4914 rt4914 added this to the Backlog milestone Jun 29, 2021
@anandwana001 anandwana001 changed the title Arrange activity titles for activitties in app/home package in strings.xml under one section named <!-- Activity Titles --> Arrange string resources based on Screens Jun 29, 2021
@anandwana001 anandwana001 changed the title Arrange string resources based on Screens Arrange string resources based on screens Jun 29, 2021
@anandwana001 anandwana001 removed the Priority: Important This work item is really important to complete for its milestone, but it can be scoped out. label Jun 29, 2021
@TheSwarnim
Copy link
Contributor

Hello @rt4914 @anandwana001, please assign this issue to me. I'm working on it

@TheSwarnim
Copy link
Contributor

Hello @anandwana001, Sir I've added a PR, please review it.

@anandwana001
Copy link
Contributor

anandwana001 commented Jul 25, 2021

@rishidyno Could you please comment here so that I can get your GitHub handle in the assignee section to assign this issue to you?

@rishidyno
Copy link
Contributor

@anandwana001 I would like to work on this issue.

@aadityaguptaa
Copy link
Contributor

@anandwana001 can I work on this issue, please?

@MaskedCarrot
Copy link
Contributor

Since there has been no PR from @rishidyno, so assigning this to @aadityaguptaa

@rt4914
Copy link
Contributor

rt4914 commented Nov 18, 2021

@aadityaguptaa Unassigning you from this issue because of inactivity, please re-assign yourself if you are currently working on this.

@adizcode
Copy link
Contributor

I would like to work on this.

@seanlip seanlip added bug End user-perceivable behaviors which are not desirable. and removed issue_type_infrastructure labels Mar 28, 2023
@adhiamboperes adhiamboperes added Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. work label added labels May 3, 2023
@Ayush-865
Copy link

Ayush-865 commented May 14, 2023

Please assign this issue to me, I can solve this issue. @BenHenning @seanlip
I will organise the strings.xml file as requested.
Screenshot (138)

@adhiamboperes
Copy link
Collaborator

@Ayush-865, this issue is currently assigned to @MohitGupta121.

Please take a look at #2399 instead.

Generally, please only look at issues that are not assigned to anyone at the moment.

@TanishMoral11
Copy link
Collaborator

@anandwana001 I would like to work on this issue.

@uphargaur
Copy link

is this issue open to work ?

@adhiamboperes
Copy link
Collaborator

@uphargaur, assigning this issue to you. To work on this, please do not change all the strings at once. Instead, please do 4-5 screens per PR. #5252 was the latest attempt to fix this issue, and is mostly the approach we are taking.

@uphargaur
Copy link

uphargaur commented Jan 13, 2025

update :- working on this ,getting some error to build , shared this on 5632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement End user-perceivable enhancements. good first issue This item is good for new contributors to make their pull request. Impact: Low Low perceived user impact (e.g. edge cases). Issue: Needs Break-down Indicates that an issue is too large and should be broken into smaller chunks. Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Projects