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

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

Open
hichamboushaba opened this issue Oct 30, 2019 · 9 comments
Open
Assignees

Comments

@hichamboushaba
Copy link

hichamboushaba commented Oct 30, 2019

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
Copy link
Contributor

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

@hichamboushaba
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@way2jatin
Copy link

@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
Copy link

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
Copy link

I confirm issue still exists in 3.2.1

@RavinaBuran
Copy link

I am still facing same issue on 3.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants