skip a step you want, and reduce the language selection

Bug #1100681 reported by kobe
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

This is used for a Chinese customized release named "UbuntuKylin" . We want to skip some steps and reduce the language selection.

(1)Skip some steps:
UbuntuKylin need to skip a step we want by configuring file, rather than through a line configuration to skip several steps,
For example, UbuntuKylin need to retain the "Welcome" page for selecting language, but skip the "Preparing to install Ubuntu" interface. Also, it needs to skip the keyboard selection page, the default is U.S. keyboard, rather than select it in installing process.

(2)Reduce the language selection:
As mentioned above,UbuntuKylin need to retain the language selection page,but it only needs three languages, they are Simplified Chinese, Traditional Chinese and English, the default is Simplified Chinese.

ProblemType: Requirement for UbuntuKylin(Bug)
DistroRelease: Ubuntu 13.04
Package: ubiquity_2.13.9
ProcVersionSignature: Ubuntu 3.8.0-0-generic
Uname: Linux 3.8.0-0-generic i686
Date: Thu, 17 Jan 2013 16:53:50

kobe (kobe24-lixiang)
summary: - skip a step you want, and reduce the language selections
+ skip a step you want, and reduce the language selection
Revision history for this message
Jack Yu (jackyu) wrote :

Hi Colin, as refered in bug https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1097113, we also want to skip some other steps (e.g., keyboard selection) and config only three choices (they are Simplified Chinese, Traditional Chinese and English.) in language selection. Thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

Could you make these two separate bugs, please? I expect it's quite likely that we might fix these in separate changes, so they should be tracked independently.

1)
For a first cut, I'd suggest doing this by implementing the "plugin_skip_page" method on the appropriate PluginUI subclasses. You can have them check debconf preseeding (e.g. ubiquity/skip/prepare) for whether to do this; in fact, it might even make sense to have a default implementation of plugin_skip_page on PluginUI itself that looks up a debconf template based on the page name.

It may be that in some cases this will turn out not to work, for example if there's some specific reason for the plugin's filtered command to run even when it's been entirely preseeded. In that case, get in touch with me and we can talk through doing something more complex related to automatic mode.

2)
Preseeding ubiquity/only-show-installable-languages to true may turn out to be enough for you. If it isn't, I suggest looking at how that's implemented (start at ubiquity/plugins/ubi-language.py:Page.run and also see ubiquity/i18n.py:get_languages) and doing similar filtering based on a new preseedable debconf template that lists the language codes that should be displayed.

Changed in ubiquity (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Wishlist
Revision history for this message
Jack Yu (jackyu) wrote :

Sure. We will submit two separate bugs asap.

Revision history for this message
kobe (kobe24-lixiang) wrote :

Hi Colin,
Thanks for your useful response. Now I'm sure the preseed file is enough for my second question.
I have submitted a new bug separated from this bug for my first question . Here you can see it: https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1103263 .

Revision history for this message
kobe (kobe24-lixiang) wrote :

For the second question, maybe we can achieve the requirement by modifing ubiquity/plugins/ubi-language.py and ubiquity/i18n.py, even we can delete language packs or chage the languagelist.data file.
But we want to use the method as Colin said, and if we try to use ubiquity/only-show-installable-languages at ubuntu.seed file, its value is always false.
--->Here is our attempt one:
1) at preseeds/ubuntu.seed, we write a line:ubiquity ubiquity/only-show-installable-languages boolean true ;
2) in livecd, we found that the value of "only-show-installable-languages" is false.

---->Attempt two:
Also, we had used a complex method to change the value to "true", but during the installation process ,we found the language list does not have any change. we check the codes of ubiquity ( "ubiquity/i18n.py:get_languages"):
if only_installable:
            pkg_name = 'language-pack-%s' % code
            .......
            try:
                pkg = cache[pkg_name]
                if not (pkg.installed or pkg.candidate): (1)
                   ......
            except KeyError:
                ......

Our question is (1), if it is "if not pkg.installed", the language list will only display the language packs installed. So, it is close to our requirements.
If we use "if not (pkg.installed or pkg.candidate)", the language list will display all language. we think that the reason is pkg.candidate and online.

Because our attempt failed, so we want to know how we can make it "true" easily . if we change codes for UbuntuKylin, whether our codes can merge into the trunk or not?

kobe (kobe24-lixiang)
Changed in ubiquity (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.