wordpress-mobile / wordpress-mobile/WordPress-Android

Add Lint check for attachBaseContext(context)

Open
#7,460 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Enhancement General Good First Issue
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

PR #7413 added a new requirement that any new Activity that requires localization must include the following:

@Override
protected void attachBaseContext(Context newBase) {
      super.attachBaseContext(LocaleManager.setLocale(newBase));
}

Since using a BaseActivity in the past led to some issues, it was decided to add the method directly to the activity and has been recommended that we create a lint check to make sure it is done in the future. Opened this ticket to start the discussion around adding this lint check.

cc: @aforcier @maxme - WDYT?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no implementation files or tests. Start by reviewing PR #7413 and the attachBaseContext example, then clarify which Activities requiring localization should be checked with the maintainers. Done means the agreed cases are covered by an Android lint check.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.