Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canadian French keyboard is offered after selecting Canadian English #828

Open
eucharistia opened this issue Oct 6, 2024 · 1 comment
Open
Labels
i18n Priority: Low On the radar, but not the most urgent thing Status: Confirmed Verified by someone other than the reporter

Comments

@eucharistia
Copy link

eucharistia commented Oct 6, 2024

What Happened?

When I install the Sponsor RC for eOS 8, I select Canadian English and then I'm offered the French Canadian keyboard (likely because it's the only Canadian keyboard)

Steps to Reproduce

  1. Attempt to install eOS 8
  2. Select English
  3. Select Canada
  4. Be offered the French Canadian keyboard

Expected Behavior

  1. Select English
  2. Select Canada
  3. Be offered the standard US keyboard

OS Version

8.x (Early Access)

Session Type

Classic Session (X11, This is the default)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

@eucharistia eucharistia changed the title Canadian french keyboard is offered after selecting Canadian English Canadian French keyboard is offered after selecting Canadian English Oct 6, 2024
@ryonakano ryonakano added Priority: Low On the radar, but not the most urgent thing Status: Confirmed Verified by someone other than the reporter i18n labels Oct 8, 2024
@ryonakano
Copy link
Contributor

(likely because it's the only Canadian keyboard)

This seems to be correct. We set the layout as default whose name matches with the user chosen country here:

Idle.add_once (() => {
unowned string? country = Configuration.get_default ().country;
if (country != null) {
var default_layout = country.down ();
var child = input_variant_widget.main_listbox.get_first_child ();
while (child != null) {
if (child is LayoutRow) {
unowned var row = (LayoutRow) child;
if (row.layout.name == default_layout) {
input_variant_widget.main_listbox.select_row (row);
row.grab_focus ();
break;
}
}
child = child.get_next_sibling ();
}
}
});

And looking at /usr/share/X11/xkb/rules/base.xml which we parse to get the list of layouts the country name of Canadian ca matches French (Canada) keyboard:

    <layout>
      <configItem>
        <name>ca</name>    ←Current Layout
        <!-- Keyboard indicator for French layouts -->
        <shortDescription>fr</shortDescription>
        <description>French (Canada)</description>
        <countryList>
          <iso3166Id>CA</iso3166Id>
        </countryList>
        <languageList>
          <iso639Id>fra</iso639Id>
        </languageList>
      </configItem>
      <variantList>
        <variant>
          <configItem>
            <name>fr-dvorak</name>
            <!-- Keyboard indicator for French layouts -->
            <shortDescription>fr</shortDescription>
            <description>French (Canada, Dvorak)</description>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>fr-legacy</name>
            <!-- Keyboard indicator for French layouts -->
            <shortDescription>fr</shortDescription>
            <description>French (Canada, legacy)</description>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>multix</name>
            <description>Canadian (CSA)</description>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>eng</name>    ←Expected Layout
            <!-- Keyboard indicator for English layouts -->
            <shortDescription>en</shortDescription>
            <description>English (Canada)</description>
            <languageList>
              <iso639Id>eng</iso639Id>
            </languageList>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>ike</name>
            <!-- Keyboard indicator for Inuktikut layouts -->
            <shortDescription>ike</shortDescription>
            <description>Inuktitut</description>
            <languageList>
              <iso639Id>iku</iso639Id>
            </languageList>
          </configItem>
        </variant>
      </variantList>
    </layout>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Priority: Low On the radar, but not the most urgent thing Status: Confirmed Verified by someone other than the reporter
Projects
Status: Confirmed
Development

No branches or pull requests

2 participants