Localization

Alexander Larsson alexl at redhat.com
Thu Jun 30 15:23:47 UTC 2016


On Wed, 2016-06-29 at 11:41 +0100, Richard Hughes wrote:
> On 29 June 2016 at 10:17, Alexander Larsson <alexl at redhat.com> wrote:
> > > * Is the update/remove case handled automatically when there are
> > > locales installed or do I have to handle that explicitly?
> > You have to do that explicitly.
> 
> So if the user installs an app with the flatpak CLI, should
> gnome-software "repair" the app and also install the required locales
> too?
> 
> > Its the first part of the local string. I.e. "foo_BAR at gazonk" =>
> > "foo".
> 
> wfm, thanks.
> 
> > Its like any other runtime.
> 
> flatpak remote-ls just shows me:
> 
> org.gnome.gedit.Locale
> 
> I'm confused what this is; if I install this do I get all locales?
> `flatpak install gnome-apps org.gnome.gedit.Locale --subpath=fr`
> might
> be what I want, but then I need a way to list sub-paths for things
> that are not installed, otherwise I'm guessing the install is going
> to
> blow up if I just pass it all subpaths that the user wants (e.g.
> ['fr','en','random']. So basically I need to be able to:

The subpaths are "/fr", "/en", etc. But yeah, they work fine (i.e. do
nothing for that path) if you specify some path that doesn't exist. I
have tests for this even, for instance if one subdir appears or
disappears during update.

> 1. List subpaths installed already
> (flatpak_installed_ref_get_subpaths?)

Yes.

> 2. List subpaths available for a given app that's not installed, so I
> can add it to the list of things to be installed

How do you expect to use this?

> 3. Be able to specify the subpath when installing the locale
> (flatpak_installation_install_full?)

Yeah.

> Is there API I can use for 2? Or will
> flatpak_installation_install_full() do sane things if a subpath is
> not available?

It will be sane.




More information about the xdg-app mailing list