Ubuntu files related to keyboard detection

From ubiquity 2.21.0 source package:
- ubiquity/keyboard_detector.py
- ubiquity/frontend/gtk_components/keyboard_query.py

From console-setup 1.70ubuntu9 binary package:
- /usr/share/console-setup/pc105.tree

Note: pc105.tree is normally generated at build-time by keymaptree.
We could possibly address the need for this file by installing
console-setup rather than console-setup-mini (adds about 500 kB
to image), or perhaps by including the file in console-setup-mini.

[endlessm/eos-shell#3425]
Hack keyboard detection to work outside Ubiquity

Assume all the files are in a single local directory,
and avoid the need for the string management framework.

[endlessm/eos-shell#3425]
Don't commit python compiled files

[endlessm/eos-shell#3425]
Test script for keyboard detection

Runs the keyboard query and prints the results to standard output.

[endlessm/eos-shell#3425]
endless-eula: change the page title

To match new designs.

[endlessm/eos-shell#3601]
Add button for keyboard layout detection

Still needs to launch the actual detection heuristic.
Currently just prints a test message to standard out.

[endlessm/eos-shell#3425]
endless-eula: show terms and conditions inline

We use an EvView from the Evince library for this purpose.

[endlessm/eos-shell#3601]
endless-eula: handle external links from terms and conditions

Handle the two links we care about inline by presenting a modal dialog.

[endlessm/eos-shell#3601]
Move keyboard detection tree file to keyboard page

The pc105.tree file from Ubuntu is now included in the GResource that
belongs to the keyboard layout page.

[endlessm/eos-shell#3425]
Port Python keyboard detector to C

This is a straightforward port to C of the keyboard detector code
from Ubuntu's installer; with the exception of "Cancel" and "Add" buttons
in the dialog box. When the detection heuristic has finished, the "Add"
button becomes active.

(Roddy, Philip)

[endlessm/eos-shell#3425]
Incorporate keyboard detection heuristic

Hooks up the dialog box ported in the previous commit to the keyboard
layout selection page. If the user clicks "Add" after the keyboard has
been guessed, it will be added to the list of keyboards on the page, and
automatically selected so that the "Next" button becomes active. If the
guessed layout was already in the list, it will still be selected.

(Roddy, Philip)

[endlessm/eos-shell#3425]
Remove Python files

These have been ported to C and are not needed anymore.

[endlessm/eos-shell#3425]
Add files with new strings to POTFILES.in

[endlessm/eos-shell#3425]
Refactor read_step() into process_line()

The code for processing each line of the keyboard tree file moves into
its own function, in order to avoid mistakes with having to free the
line at each exit point of the loop.

This requires moving another variable into the KeyboardDetector struct
(marked private in a comment.)

[endlessm/eos-shell#3425]
Merge pull request #71 from endlessm/shell/3425

Automatic keyboard detection
Merge pull request #70 from endlessm/shell/3601

Shell/3601
Infrastructure for keyboard detection by language

This allows simpler detection trees that only need to distinguish
among the likely keyboards for a user's language.

Using gettext locale rules, search for the best available match
in order from most desirable to least desirable, and fall back to
the full detection tree (default locale "C") if no better match.

To add support for a specific language, create the appropriate
directory in gnome-initial-setup/pages/keyboard/detector-trees
with a tweaked version of pc105.tree, and add the file path to
gnome-initial-setup/pages/keyboard/keyboard.gresource.xml.

[endlessm/eos-shell#4213]
Keyboard detection trees for Spanish and Portuguese

If the user's language is Spanish or Portuguese,
assume the user is using one of the following keyboards:
br, es, latam, pt, or us.
This greatly simplifies the detection logic.
(If the user has something different, he/she can still
manually select a specific layout.)

For now, we use the same trees for Spanish and Portuguese,
under the assumption that there may be some cross-pollination
of Spanish and Portuguese speakers and keyboards throughout
Latin America.

The maps are generated via the keymaptree script provided
with the source of console-setup-1.70ubuntu10, by modifying
keymaptree.use to include only the relevant layouts.

[endlessm/eos-shell#4213]
Remove detection of us:intl keyboard

The step asking a user if the umlaut key (¨) is present
is very confusing, as it can easily be mistaken for the
double quotation marks (").  Many users who have a US keyboard
would thus incorrectly be detected as us:intl.  Besides, most
if not all users who want the us:intl layout would be using a
standard US keyboard and the umlaut would not be physically
visible on the keyboard.  Better to just let those users who
want the international mapping for the US keyboard to manually
select the appropriate layout.

[endlessm/eos-shell#4213]
Merge pull request #72 from endlessm/shell/4213

Shell/4213