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

All warnings in "Internationalization" and "Internationalization:Bidirectional Text" category #5182

Closed
Tracked by #5169
adhiamboperes opened this issue Oct 9, 2023 · 2 comments · Fixed by #5183
Closed
Tracked by #5169
Assignees
Labels
bug End user-perceivable behaviors which are not desirable. 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). Work: Low Solution is clear and broken into good-first-issue-sized chunks.

Comments

@adhiamboperes
Copy link
Collaborator

adhiamboperes commented Oct 9, 2023

Description

We would like to fix all the remaining lint issues on Oppia Android in "Internationalization" category.

Steps To Reproduce

Run the following command from a terminal in a checked-out Oppia Android repo:

./gradlew :app:lint

Output: All warnings in "Internationalization" category

Expected Behavior

Running the command above should not show any errors.

@adhiamboperes adhiamboperes added Impact: Low Low perceived user impact (e.g. edge cases). bug End user-perceivable behaviors which are not desirable. Work: Low Solution is clear and broken into good-first-issue-sized chunks. good first issue This item is good for new contributors to make their pull request. labels Oct 9, 2023
@adhiamboperes
Copy link
Collaborator Author

@Rd4dev, PTAL.

The approach you have suggested in Rd4dev@9e47b96 sounds good, but we need to work on the naming of the strings. Consider using a pattern that follows stringname_stringtype, e.g. concept_card_two_button_text

@Rd4dev
Copy link
Collaborator

Rd4dev commented Oct 9, 2023

Thank you for the initial review @adhiamboperes. I have made modifications to certain string resources to enhance their clarity in terms of data type. However, I have retained the title and hint variables in their existing state. If it is deemed necessary, I will make the adjustments to them as well, based on any suggestions provided.

adhiamboperes added a commit that referenced this issue Oct 14, 2023
<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->
Fix #5182 [part of #5169]

Fixes All warnings in "Internationalization" caused by
- hardcoded text : Fixed by assigning `string resource` values
- padding/margins : Fixed by setting `padding end` values

## ScreenShot:
![Lint Issues Internationalization Before
After](https://github.com/oppia/oppia-android/assets/122200035/a2f04893-b670-499b-980b-5151097b47c0)

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

<!--
## For UI-specific PRs only
Delete these section if this PR does not include UI-related changes.
If your PR includes UI-related changes, then:
- Add screenshots for portrait/landscape for both a tablet & phone of
the before & after UI changes
- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL
guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide))
- For PRs introducing new UI elements or color changes, both light and
dark mode screenshots must be included
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing
-->
<br>

---------

Co-authored-by: Adhiambo Peres <[email protected]>
BenHenning added a commit that referenced this issue Jan 9, 2024
…sability" categories (#5196)

<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->
Fixes #5194 [part of #5182]

Fixes all warning in "Usability" category caused by

- **Borderless Buttons :** Fixed by introducing
`style="?android:attr/buttonBarButtonStyle"` to the borderless buttons
- **OK text capitalization :** Fixed by suppressing the lint warnings
for `ButtonCase` and `Typos`
- **Ellipsis/Hyphen unicode replacement :** Fixed by introducing unicode
representations (under review)
- **Image in density drawable folder :** Fixed by creating seperate
density images (under review)
- **Text size too small :** Fixed by upscaling text size to `12sp`
- **To incorporate Autofill :** Fixed by incorporating `autofillHints`
to the EditText

## ScreenShot

![Before After Usability Lint
Issues](https://github.com/oppia/oppia-android/assets/122200035/5a7037f5-ca22-482a-a0f3-8af2bfc8b75c)

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

---------

Co-authored-by: Adhiambo Peres <[email protected]>
Co-authored-by: Ben Henning <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug End user-perceivable behaviors which are not desirable. 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). Work: Low Solution is clear and broken into good-first-issue-sized chunks.
Development

Successfully merging a pull request may close this issue.

2 participants