mNo edit summary |
|||
Line 48: | Line 48: | ||
== Other data sources == | == Other data sources == | ||
{| | |||
| '''Data Source''' | |||
| '''Includes''' | |||
| '''Does Not Include''' | |||
|- | |||
| iso-codes | |||
| | |||
* country subdivisions (state/province), indexed by country | |||
* countries, and their country code | |||
* country subdivisions (state/province), indexed by country | |||
* countries, and their country code | |||
* languages | * languages | ||
| | |||
* languages to countries mapping | |||
* languages to countries | |- | ||
| localedata | |||
| | |||
* languages to countries (more or less) | * languages to countries (more or less) | ||
| | |||
* mapping of languages to a primary locale/country | |||
* languages to a primary locale/country | |- | ||
| tzdata | |||
| | |||
* timezones, indexed by country | * timezones, indexed by country | ||
* latitude/longitude for timezones | * latitude/longitude for timezones | ||
| | |||
* locales to country mapping | |||
* locales to country | * mapping random cities to timezones (only specific timezone cities) | ||
* random cities to timezones (only specific timezone cities) | |- | ||
| libgweather | |||
| | |||
* many many cities, organized by country | * many many cities, organized by country | ||
** with timezone | ** with timezone | ||
** with lat/lon | ** with lat/lon | ||
** with weather codes | ** with weather codes | ||
| | |||
* cities/countries to locale | * cities/countries to locale | ||
|- | |||
| geoclue | |||
| | |||
* current location to: | * Maps current location to: | ||
** country | ** country | ||
** city | ** city | ||
** latitude/longitude | ** latitude/longitude | ||
| | |||
N/A | |||
|- | |||
* language name to xkb layout (1:n, though) | | xkeyboard-config | ||
* country name to xkb layout | | | ||
* maps language name to xkb layout (1:n, though) | |||
* maps country name to xkb layout | |||
| | |||
N/A | |||
|} | |||
== Widgetry == | == Widgetry == |
Revision as of 22:40, 9 December 2010
Resources
- Original mailing list thread
- http://notting.fedorapeople.org/datetime.png
- http://duffy.fedorapeople.org/mockups/installer-next-gen/anaconda/locale/pony.png
Issues
Today I was looking at https://bugzilla.redhat.com/show_bug.cgi?id=624158; part of that bug involved creating a locale mapping file in initscripts; this seemed like a bad idea. When considering that, I thought of lang-table, and wondered 'how could we get rid of that'.
Summary of Issues
- multiple locale/location screens
- no auto-detection
- anaconda-specific locale mapping files - we really shouldn't be driving off of configuration sources that only live in anaconda.
We can do better.
Multiple Locale / Location Screens
Anaconda currently has multiple locale/location screens:
- language selection (custom anaconda)
- keyboard selection (from s-c-keyboard, but nothing else uses that)
- timezone selection (from s-c-date)
- clock setting / ntp (in firstboot)
Needed Localization Info
Anaconda needs the following bits of localization info:
- locale/language
- timezone
- keyboard layout
- text font
Data Sources
What Anaconda currently uses
Anaconda uses the following data sources:
- tzdata
- lang-table (a custom anaconda file)
Anaconda does *zero* autodetection.
Available Resources
Other data sources
Data Source | Includes | Does Not Include |
iso-codes |
|
|
localedata |
|
|
tzdata |
|
|
libgweather |
|
|
geoclue |
|
N/A |
xkeyboard-config |
|
N/A |
Widgetry
Split-Out Widgetry
- system-config-date - timezone selector
- Uses: tzdata
- system-config-date - timezone selector
- Uses: custom hardcoded mappings in the code, lang-table
- system-config-language - language selector
- Uses: iso-codes
- anaconda language selector - language selector
- Uses: lang-table
Codebases that don't have widgetry split out
- gdm - language and keyboard selectors
- Uses: iso-codes, xkeyboard-config
- gnome-control-center datetime - timezone selecor
- gnome-panel - location selector
- Uses: libgweather, tzdata
Widgetry currently in development
- gnome locale configuration applet
- Uses: iso-codes, xkeyboard-config, and more
- http://live.gnome.org/Design/SystemSettings/RegionAndLanguage
Proposal #1
On boot, as soon as there is networking available, start geoclue. Acquire location information. Then, feed the information as so:
- country, latitude/longitude (from geoclue)
- timezone (from country, lat/lon, via tzdata)
- language (via ???????, see below)
- keyboard layout (from country/language combo, via xkeyboard-config)
- text font (hardcoded!)
Notes:
- What if we don't have network? Do DHCP always on link!
- It's easy to get a list of possible languages given the country. There's no canonical data source of what to use for the *primary* language, though. We could make a mapping table (ugh), or do heuristics (double ugh).
- text font is hardcoded to 'latarcyrheb-sun16'. We could conceivable have an override for the very few people who can't use that.
We then display as so:
Current settings: Location: United States [ change ] [ details ]
If you click 'change', it pops up a selector dialog that either:
- allows you to enter a location (similar to the gnome panel clock code)
- allows you to click a location (similar to the control center timezone selector)
Either of those resets country, timezone, language, keyboard layout, etc. If you select 'details', (or '>>>', or some expander, to be language-neutral), you get:
Language: English [ change ] Country: USA [ change ] Time: 2:33 PM (US Eastern) [ change ] Keyboard Layout: us [ change ]
Then, each of those options pops up a single-purpose configuration dialog. anaconda can either use the gnome capplet once it's done, or roll its own.