zoontek / react-native-localize

🌍 A toolbox for your React Native app localization
MIT License
2.26k stars 210 forks source link

Update Manual Linking Instructions for Android #255

Closed kendrick-inkind closed 5 months ago

kendrick-inkind commented 5 months ago

Before submitting a new issue

Bug summary

On the npm package page for this module, manual linking instructions for Android are given, but they are slightly wrong:

Under the step: 3. Add the import and link the package in MainApplication.java:,

the import should be: import com.zoontek.rnlocalize.RNLocalizePackage;

instead of import com.reactcommunity.rnlocalize.RNLocalizePackage;

Library version

3.1.0

Environment info

System:
    OS: macOS 13.5
    CPU: (12) arm64 Apple M2 Max
    Memory: 74.05 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
    Yarn: Not Found
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm
    Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /Users/kendrick.gardner/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK:
      API Levels: 28, 30, 31, 33
      Build Tools: 30.0.2, 30.0.3, 33.0.0
      System Images: android-33 | Google APIs ARM 64 v8a, android-34 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.10121639
    Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.19 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: ^5.0.1 => 5.0.1 
    react: ^17.0.2 => 17.0.2 
    react-native: ^0.64.3 => 0.64.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. If manual linking fails on Android
  2. Attempt to follow manual linking instructions provided on npm page.
  3. Manual linking fails, as next Android build will crash with this error: error: package com.reactcommunity.rnlocalize does not exist

Reproducible sample code

No sample code needed
zoontek commented 5 months ago

@kendrick-inkind Thanks, can you do the PR?

kendrick-inkind commented 5 months ago

@kendrick-inkind Thanks, can you do the PR?

Sure! Note, the manual linking instructions are only on the NPM package README and not the Github readme. I wasn't able to find the NPM Package README in this repo. If you can point me to it, I'll gladly make the update.

I'll also note that the link above isn't the latest version of the NPM Package README (which is here), but it is the version of the NPM Package Readme found when one Googles react-native-localize

zoontek commented 5 months ago

@kendrick-inkind What you are pointing to is indeed the v1.3.0 README…this has been fixed a long time ago (and it was actually the correct namespace at this time), and as it's a previous release it's correct. This is just a google issue, it just need to recrawl.

kendrick-inkind commented 4 months ago

Understandable. We're using React Native Localize 3.1.0, but on RN 0.64.3, and auto-linking didn't work on Android, which is what led me to your older manual linking instructions.

It seems probable linking just works fine in the latest versions of RN, since there aren't any other reports of this and since you no longer include manual linking instructions in the newer READMEs. Thanks for looking it over, and for the great software!