[PATCH 1/3] Add a help button to every Anaconda screen
David Shea
dshea at redhat.com
Fri Aug 15 18:42:38 UTC 2014
On 08/15/2014 01:05 PM, Martin Kolman wrote:
>
> ----- Original Message -----
>> From: "Chris Lumens" <clumens at redhat.com>
>> To: anaconda-patches at lists.fedorahosted.org
>> Sent: Friday, August 15, 2014 6:52:38 PM
>> Subject: Re: [PATCH 1/3] Add a help button to every Anaconda screen
>>
>>> +def get_help_path(help_file):
>>> + """Return the full path for the given help file name,
>>> + if the help file path does not exist a fallback path is returned.
>>> + There are actually two possible fallback paths that might be returned:
>>> + * first we try to return path to the main page of the installation
>>> guide
>>> + (if it exists)
>>> + * if we can't find the main page of the installation page, path to a
>>> + "no help found" placeholder bundled with Anaconda is returned
>>> +
>>> + :param str help_file: help file name
>>> + :return str: full path to the help file requested or to a placeholder
>>> + """
>>> + # check if the screen has any helpFile defined
>>> + if help_file:
>>> + # check if the help file exists
>>> + help_path = os.path.join(constants.HELP_FOLDER, help_file)
>>> + if os.path.isfile(help_path):
>>> + return help_path
>>> + else:
>>> + log.debug("the %s help file has been requested, but is not
>>> available", help_file)
>>> +
>>> + # the screen did not have a helpFile defined or the defined help file
>>> + # does not exist, so next try to check if we can find the main page
>>> + # of the installation guide and use it instead
>>> + help_path = os.path.join(constants.HELP_FOLDER,
>>> constants.HELP_MAIN_PAGE)
>>> + if os.path.exists(help_path):
>>> + return help_path
>>> +
>>> + # looks like the installation guide is not available, so just return
>>> + # a placeholder page that should always be available
>>> + if flags.livecdInstall:
>>> + return os.path.join(constants.HELP_FOLDER,
>>> constants.HELP_PLACEHOLDER_WITH_LINKS)
>>> + else:
>>> + return os.path.join(constants.HELP_FOLDER,
>>> constants.HELP_PLACEHOLDER)
>> How will translations be handled?
> Thats a good point - do we already handle something similar
> (out of source-code files that contain translatable strings)
> somewhere else ?
>
> As for the help content itself, the current plan is that it will
> be maintained by the people working on the installation guide as
> an RPM available from the repos - we will just pull it in as any other
> dependency. So the translation itself should be also handled by them
> as I'm sure they have a translation workflow in place.
>
> The technical details of showing the translations in Anaconda still need to be decided though:
> * how to package the translations
> - one big vs multiple packages ?
> * how to switch the translations
> - subfolders per language ?
> - file prefixes/suffixes ?
> - or is there some internal DocBook thing for this ?
> * how big will the translated help content be
> - influences the installation image size
> - some images having the full translated help set/some just english/some no help at all ?
> - pulling the translated help package from the network after language selection ?
There already is a way for yelp to handle translations.
https://wiki.gnome.org/Apps/Yelp/Tools/yelp.m4 has the automake bits,
and basically what you do from there put the original files in the C/
directory and then .po files with the help translations in
language-specific directories. The install rules put the results in
/usr/share/help, and that can be viewed in yelp using a
help:anaconda/<pagename> URI. The questions from there are whether we
can get the external data source to install data like this, and how do
handle the translations of the two no-help pages.
>
>> - Chris
>> _______________________________________________
>> anaconda-patches mailing list
>> anaconda-patches at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
More information about the anaconda-patches
mailing list