phrase / phrase-android

Phrase Over the Air Android SDK
https://phrase.com
Other
6 stars 1 forks source link

PhraseApp SDK doesn't support inflated menus and preferences #10

Open hichamboushaba opened 4 years ago

hichamboushaba commented 4 years ago

We are facing an issue with the SDK in our app, all of the views using inflated menus (for example: NavigationMenuView) and the preferences defined in XML (https://developer.android.com/reference/androidx/preference/PreferenceFragmentCompat.html#addPreferencesFromResource(int)) are not supported: the locale passed to setup is not respected, and translations are not updated via OTA.

theSoenke commented 4 years ago

Hi @hichamboushaba, thanks for reporting it. I will have a closer look at this and provide an update as soon as possible

hichamboushaba commented 4 years ago

Hi @theSoenke, do you have any eta on this bug? we need to decide if we are going to implement OTA soon in our app or not.

theSoenke commented 4 years ago

Hi @hichamboushaba, I'm sorry for the delay. We've been busy to get the latest version 2.0 out. We will tackle this issue next. I can't promise an exact release date but I will try to make sure to get this fixed as fast as possible

theSoenke commented 4 years ago

We did some further investigation into the issue and currently it is technically not feasible to support menus as inflating menu from XML cannot be really intercepted.

It is still possible to manually update the menu items though which will use the latest Over the Air translations. For example an options menu:

@Override  
public boolean onCreateOptionsMenu(Menu menu) {
  MenuInflater inflater = getMenuInflater();
  inflater.inflate(R.menu.main_menu, menu);
  menu.findItem(R.id.menu_entry1).setTitle(R.string.menu_entry1);
  return true;
}

This is not an ideal solution and we are keeping an eye out whether there is a better approach. But right now we can't really support this menu out of the box without adding some code like above

theSoenke commented 3 years ago

@hichamboushaba The latest version 3.0.0 now added support for inflated menus

way2jatin commented 3 years ago

@theSoenke The issue related to support for inflated menus is still there. I m currently using version 3.0.6 and still facing the same issue. I have also tried the above code snippet to set the bottom navigation menu title programatically. But no luck whatsoever. Could you please have a look ?

HappyDr0id commented 2 years ago

I confirm the issue is still reproduced on both 3.0.6 and 3.1.2 SDK versions: the menu and preferences wordings are not updated by the OTA. The manual update is working for the menu on my side, but not for preferences tho.

surajnavkudkar commented 1 year ago

I confirm issue still exists in 3.2.1

RavinaBuran commented 1 year ago

I am still facing same issue on 3.2.3