Skip to content

zhuanghongji/react-native-openai-translator

Repository files navigation

react-native-openai-translator

Not just a translator, and more than chat.

Instruction

Modes - Case of translate English Word into Chinese. Chats - Add and customize any chat by youself. Discover - Discover something new about OpenAI and GPT. Me - Locate and manage all of what you created. Settings - Light
Modes - Case of polishing English Word into English. Mode Chat - Continuously chat with polishing mode reuslt. Share - By capturing messages view and save into album. Share - By copy plain messages text into any other app. Settings - Dark
English Word Records Create new Chat with your input Create new Chat from Awesome Prompts Customize the Chate you created Read Prompt Engineering Guide by url

The screenshots above are all from v0.1.0, which is not the final version you are looking for.

Rodemap

Screens

  • AITranslator
    • Splash
    • Main
      • Modes
      • Chats
      • Discover
      • Me
    • Scanner
    • Settings
    • ModeChat
    • CustomChat
    • ShareDialogue
    • PromptEngineeringGuide
    • ModeWordCollections
    • ModeResultCollections
    • ...

To-Do List

  • feat: make translator-mode pageable in Modes screen
  • feat: support custom chat
  • feat: support 'view-capture' and 'text-shot' of a single dialogue
  • feat: support chat-persist by sqlite
  • feat: support at least 5 user language
  • feat: provide an option to hide avatars in chat
  • feat: double back-press to exit app on Android
  • feat: show app version in settings screen
  • feat: auto detect app language
  • feat: add common Chinese prompts
  • feat: translate Awesome Prompts to more langs (Chinese First)
  • feat: add prompts playground
  • docs: how to contribute
  • docs: how to build iOS app for personal use
  • docs: support show version name in Settings screen
  • ux: remove 'from-lang' in Modes screen for better user experience
  • ux: invert 'chat-list'
  • refactor: reimplement theme-setting by React Context

Maybe To-Do List

  • feat: support Azure OpenAI Service
  • feat: support Azure TTS
  • feat: support 'As keyboard everywhere'
  • feat: support MarkDown preview by inner WebView
  • feat: support 'Big Bang English-Word'
  • fix: text-recognition-seems-not-stable on Android

Development

Res

Libs

Note

  • react-native-vision-camera do not support react-native-reanimated v3, so we should keep the version of reanimated at ^2.14.4.

Build Android

# 1. Clone the souce code
git clone git@github.com:zhuanghongji/react-native-openai-translator.git

# 2. Install node modules
cd react-native-openai-translator
yarn install

# 3.1 if `debug`
yarn run start
yarn run android

# 3.2 else if `release` by terminal.
# After the following two command, you can find the apk file in
cd android
./gradlew assembleRelease
# Tip 1:
# The applicationId of debug-apk will automatically be suffixed with `.dev` from that of the
# release-apk, so you run both debug-apk and release-apk in a single device.
# - application name of debug-apk: AIDev
# - application name of release-apk: AITranslator

# Tip 2:
# - To install the release-apk into you device, run the following commands:
cd ${your-project-parent-dir-path}/react-native-openai-translator/android/app/build/outputs/apk/release
# suggest installing the 64-bit version unless your device does not support it:
adb install AITranslator-arm64-v8a-[version_name].apk
# only install 32-bit below when your device unsupport 64-bit above
adb install AITranslator-armeabi-v7a-[version_name].apk

# Tip 3:
# - If you have experienced slow server-sent-event requests on Android during debugging,
#   there is no need to worry as they function properly in the release version.

Build iOS

# To Be Done

License

GNU AFFERO GENERAL PUBLIC LICENSE