[kde-doc-english] [kde-runtime] /: KCM Locale: Add support for Digit Grouping

John Layt john at layt.net
Thu May 5 12:20:15 CEST 2011


Git commit 6814970abbf481a4857d841ed299d82a8fd50008 by John Layt.
Committed on 05/05/2011 at 12:01.
Pushed by jlayt into branch 'master'.

KCM Locale: Add support for Digit Grouping

Enable to the user to choose what Digit Grouping they want to use,
e.g. 123,456,789 or 12,34,56,789.  I'm not changing the defaults for
any locale as KLocale:readMoney() strictly applies the grouping so
users would suddenly find their data entry getting rejected and
wouldn't know why.

Requires kdelibs commit 7886f78

FEATURE:
FIXED-IN: 4.7.0
GUI:

M  +159  -6    kcontrol/locale/kcmlocale.cpp     
M  +16   -0    kcontrol/locale/kcmlocale.h     
M  +87   -39   kcontrol/locale/kcmlocalewidget.ui     
M  +2    -0    l10n/C/entry.desktop     

http://commits.kde.org/kde-runtime/6814970abbf481a4857d841ed299d82a8fd50008

diff --git a/kcontrol/locale/kcmlocale.cpp b/kcontrol/locale/kcmlocale.cpp
index 6101721..237a88a 100644
--- a/kcontrol/locale/kcmlocale.cpp
+++ b/kcontrol/locale/kcmlocale.cpp
@@ -103,6 +103,11 @@ KCMLocale::KCMLocale( QWidget *parent, const QVariantList &args )
 
     // Numbers tab
 
+    connect( m_ui->m_comboNumericDigitGrouping,         SIGNAL( currentIndexChanged( int ) ),
+             this,                                      SLOT(   changedNumericDigitGroupingIndex( int ) ) );
+    connect( m_ui->m_buttonDefaultNumericDigitGrouping, SIGNAL( clicked() ),
+             this,                                      SLOT(   defaultNumericDigitGrouping() ) );
+
     connect( m_ui->m_comboThousandsSeparator,       SIGNAL( editTextChanged( const QString & ) ),
              this,                                  SLOT( changedNumericThousandsSeparator( const QString & ) ) );
     connect( m_ui->m_buttonDefaultThousandsSeparator, SIGNAL( clicked() ),
@@ -145,6 +150,11 @@ KCMLocale::KCMLocale( QWidget *parent, const QVariantList &args )
     connect( m_ui->m_buttonDefaultCurrencySymbol, SIGNAL( clicked() ),
              this,                              SLOT( defaultCurrencySymbol() ) );
 
+    connect( m_ui->m_comboMonetaryDigitGrouping,         SIGNAL( currentIndexChanged( int ) ),
+             this,                                       SLOT(   changedMonetaryDigitGroupingIndex( int ) ) );
+    connect( m_ui->m_buttonDefaultMonetaryDigitGrouping, SIGNAL( clicked() ),
+             this,                                       SLOT(   defaultMonetaryDigitGrouping() ) );
+
     connect( m_ui->m_comboMonetaryThousandsSeparator,       SIGNAL( editTextChanged( const QString & ) ),
              this,                                          SLOT( changedMonetaryThousandsSeparator( const QString & ) ) );
     connect( m_ui->m_buttonDefaultMonetaryThousandsSeparator, SIGNAL( clicked() ),
@@ -457,6 +467,7 @@ void KCMLocale::copySettings( KConfigGroup *fromGroup, KConfigGroup *toGroup, KC
     copySetting( fromGroup, toGroup, "Language", flags );
     copySetting( fromGroup, toGroup, "DecimalPlaces", flags );
     copySetting( fromGroup, toGroup, "DecimalSymbol", flags );
+    copySetting( fromGroup, toGroup, "DigitGroupFormat", flags );
     copySetting( fromGroup, toGroup, "ThousandsSeparator", flags );
     copySetting( fromGroup, toGroup, "PositiveSign", flags );
     copySetting( fromGroup, toGroup, "NegativeSign", flags );
@@ -465,6 +476,7 @@ void KCMLocale::copySettings( KConfigGroup *fromGroup, KConfigGroup *toGroup, KC
     copySetting( fromGroup, toGroup, "CurrencySymbol", flags );
     copySetting( fromGroup, toGroup, "MonetaryDecimalPlaces", flags );
     copySetting( fromGroup, toGroup, "MonetaryDecimalSymbol", flags );
+    copySetting( fromGroup, toGroup, "MonetaryDigitGroupFormat", flags );
     copySetting( fromGroup, toGroup, "MonetaryThousandsSeparator", flags );
     copySetting( fromGroup, toGroup, "PositivePrefixCurrencySymbol", flags );
     copySetting( fromGroup, toGroup, "NegativePrefixCurrencySymbol", flags );
@@ -649,6 +661,7 @@ void KCMLocale::initSettingsWidgets()
     // Initialise the settings widgets with the default values whenever the country or language changes
 
     //Numeric tab
+    initNumericDigitGrouping();
     initNumericThousandsSeparator();
     initNumericDecimalSymbol();
     initNumericDecimalPlaces();
@@ -658,6 +671,7 @@ void KCMLocale::initSettingsWidgets()
 
     //Monetary tab
     initCurrencyCode();  // Also inits CurrencySymbol
+    initMonetaryDigitGrouping();
     initMonetaryThousandsSeparator();
     initMonetaryDecimalSymbol();
     initMonetaryDecimalPlaces();
@@ -697,6 +711,7 @@ void KCMLocale::initResetButtons()
     m_ui->m_buttonDefaultTranslations->setGuiItem( defaultItem );
 
     //Numeric tab
+    m_ui->m_buttonDefaultNumericDigitGrouping->setGuiItem( defaultItem );
     m_ui->m_buttonDefaultThousandsSeparator->setGuiItem( defaultItem );
     m_ui->m_buttonDefaultDecimalSymbol->setGuiItem( defaultItem );
     m_ui->m_buttonDefaultDecimalPlaces->setGuiItem( defaultItem );
@@ -707,6 +722,7 @@ void KCMLocale::initResetButtons()
     //Monetary tab
     m_ui->m_buttonDefaultCurrencyCode->setGuiItem( defaultItem );
     m_ui->m_buttonDefaultCurrencySymbol->setGuiItem( defaultItem );
+    m_ui->m_buttonDefaultMonetaryDigitGrouping->setGuiItem( defaultItem );
     m_ui->m_buttonDefaultMonetaryThousandsSeparator->setGuiItem( defaultItem );
     m_ui->m_buttonDefaultMonetaryDecimalSymbol->setGuiItem( defaultItem );
     m_ui->m_buttonDefaultMonetaryDecimalPlaces->setGuiItem( defaultItem );
@@ -920,6 +936,34 @@ void KCMLocale::initDigitSetCombo( KComboBox *digitSetCombo )
     }
 }
 
+void KCMLocale::insertDigitGroupingItem( KComboBox *digitGroupingCombo,
+                                         KSharedConfigPtr groupingConfig, KConfigGroup *groupingSettings,
+                                         const QString &digitGroupingKey, const QString &digitGroupingFormat)
+{
+    groupingSettings->writeEntry( digitGroupingKey, digitGroupingFormat );
+    KLocale *customLocale = new KLocale( QLatin1String("kcmlocale"), groupingConfig );
+    if ( digitGroupingKey == "DigitGroupFormat" ) {
+        digitGroupingCombo->addItem( customLocale->formatNumber( 123456789.12 ), digitGroupingFormat );
+    } else {
+        digitGroupingCombo->addItem( customLocale->formatMoney( 123456789.12 ), digitGroupingFormat );
+    }
+    groupingConfig->markAsClean();
+    delete customLocale;
+}
+
+// Generic utility to set up a Digit Grouping combo, used for numbers and money
+void KCMLocale::initDigitGroupingCombo( KComboBox *digitGroupingCombo, const QString &digitGroupingKey)
+{
+    digitGroupingCombo->clear();
+    KSharedConfigPtr groupingConfig = KSharedConfig::openConfig( "kcmlocale-grouping", KConfig::SimpleConfig );
+    KConfigGroup groupingSettings = KConfigGroup( groupingConfig, "Locale" );
+    copySettings( &m_kcmSettings, &groupingSettings );
+    insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "3" );
+    insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "3;2" );
+    insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "4" );
+    insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "-1" );
+}
+
 void KCMLocale::initTabs()
 {
     m_ui->m_tabWidgetSettings->setTabText( 0, ki18n( "Country" ).toString( m_kcmLocale ) );
@@ -972,11 +1016,11 @@ void KCMLocale::initSample()
 
 void KCMLocale::updateSample()
 {
-    m_ui->m_textNumbersPositiveSample->setText( m_kcmLocale->formatNumber( 123456.78 ) );
-    m_ui->m_textNumbersNegativeSample->setText( m_kcmLocale->formatNumber( -123456.78 ) );
+    m_ui->m_textNumbersPositiveSample->setText( m_kcmLocale->formatNumber( 123456789.12 ) );
+    m_ui->m_textNumbersNegativeSample->setText( m_kcmLocale->formatNumber( -123456789.12 ) );
 
-    m_ui->m_textMoneyPositiveSample->setText( m_kcmLocale->formatMoney( 123456.78 ) );
-    m_ui->m_textMoneyNegativeSample->setText( m_kcmLocale->formatMoney( -123456.78 ) );
+    m_ui->m_textMoneyPositiveSample->setText( m_kcmLocale->formatMoney( 123456789.12 ) );
+    m_ui->m_textMoneyNegativeSample->setText( m_kcmLocale->formatMoney( -123456789.12 ) );
 
     KDateTime dateTime = KDateTime::currentLocalDateTime();
     m_ui->m_textDateSample->setText( m_kcmLocale->formatDate( dateTime.date(), KLocale::LongDate ) );
@@ -1243,6 +1287,44 @@ void KCMLocale::installTranslations()
     // User has clicked Install Languages button, trigger distro specific install routine
 }
 
+void KCMLocale::initNumericDigitGrouping()
+{
+    m_ui->m_comboNumericDigitGrouping->blockSignals( true );
+
+    m_ui->m_labelNumericDigitGrouping->setText( ki18n( "Digit grouping:" ).toString( m_kcmLocale ) );
+    QString helpText = ki18n( "<p>Here you can define the digit grouping used to display "
+                              "numbers.</p><p>Note that the digit grouping used to display "
+                              "monetary values has to be set separately (see the 'Money' tab).</p>" ).toString( m_kcmLocale );
+    m_ui->m_comboNumericDigitGrouping->setToolTip( helpText );
+    m_ui->m_comboNumericDigitGrouping->setWhatsThis( helpText );
+
+    initDigitGroupingCombo( m_ui->m_comboNumericDigitGrouping, "DigitGroupFormat" );
+
+    setNumericDigitGrouping( m_kcmSettings.readEntry( "DigitGroupFormat", "3" ) );
+
+    m_ui->m_comboNumericDigitGrouping->blockSignals( false );
+}
+
+void KCMLocale::defaultNumericDigitGrouping()
+{
+    setNumericDigitGrouping( m_defaultSettings.readEntry( "DigitGroupFormat", "3" ) );
+}
+
+void KCMLocale::changedNumericDigitGroupingIndex( int index )
+{
+    setNumericDigitGrouping( m_ui->m_comboNumericDigitGrouping->itemData( index ).toString() );
+}
+
+void KCMLocale::setNumericDigitGrouping( const QString &newValue )
+{
+    setComboItem( "DigitGroupFormat", newValue,
+                  m_ui->m_comboNumericDigitGrouping, m_ui->m_buttonDefaultNumericDigitGrouping );
+
+    // No api to set, so need to force reload the locale
+    m_kcmConfig->markAsClean();
+    m_kcmLocale->setCountry( m_kcmSettings.readEntry( "Country", QString() ), m_kcmConfig.data() );
+}
+
 void KCMLocale::initNumericThousandsSeparator()
 {
     m_ui->m_comboThousandsSeparator->blockSignals( true );
@@ -1284,6 +1366,9 @@ void KCMLocale::changedNumericThousandsSeparator( const QString &newValue )
              m_ui->m_comboThousandsSeparator, m_ui->m_buttonDefaultThousandsSeparator );
     m_kcmLocale->setThousandsSeparator( m_kcmSettings.readEntry( "ThousandsSeparator", QString() )
                                                      .remove( QString::fromLatin1("$0") ) );
+
+    // Update the numeric format samples to relect new setting
+    initNumericDigitGrouping();
 }
 
 // Change programatically, does set edit text so user can see it
@@ -1292,6 +1377,9 @@ void KCMLocale::setNumericThousandsSeparator( const QString &newValue )
     changedNumericThousandsSeparator( newValue );
     m_ui->m_comboThousandsSeparator->setEditText( m_kcmSettings.readEntry( "ThousandsSeparator", QString() )
                                                                .remove( QString::fromLatin1("$0") ) );
+
+    // Update the numeric format samples to relect new setting
+    initNumericDigitGrouping();
 }
 
 void KCMLocale::initNumericDecimalSymbol()
@@ -1329,6 +1417,9 @@ void KCMLocale::changedNumericDecimalSymbol( const QString &newValue )
     setItem( "DecimalSymbol", useValue,
              m_ui->m_comboDecimalSymbol, m_ui->m_buttonDefaultDecimalSymbol );
     m_kcmLocale->setDecimalSymbol( m_kcmSettings.readEntry( "DecimalSymbol", QString() ) );
+
+    // Update the numeric format samples to relect new setting
+    initNumericDigitGrouping();
 }
 
 // Change programatically, does set edit text so user can see it
@@ -1337,6 +1428,9 @@ void KCMLocale::setNumericDecimalSymbol( const QString &newValue )
     setEditComboItem( "DecimalSymbol", newValue,
                       m_ui->m_comboDecimalSymbol, m_ui->m_buttonDefaultDecimalSymbol );
     m_kcmLocale->setDecimalSymbol( m_kcmSettings.readEntry( "DecimalSymbol", QString() ) );
+
+    // Update the numeric format samples to relect new setting
+    initNumericDigitGrouping();
 }
 
 void KCMLocale::initNumericDecimalPlaces()
@@ -1372,6 +1466,9 @@ void KCMLocale::setNumericDecimalPlaces( int newValue )
     setIntItem( "DecimalPlaces", newValue,
                 m_ui->m_intDecimalPlaces, m_ui->m_buttonDefaultDecimalPlaces );
     m_kcmLocale->setDecimalPlaces( m_kcmSettings.readEntry( "DecimalPlaces", 0 ) );
+
+    // Update the numeric format samples to relect new setting
+    initNumericDigitGrouping();
 }
 
 void KCMLocale::initNumericPositiveSign()
@@ -1412,7 +1509,9 @@ void KCMLocale::changedNumericPositiveSign( const QString &newValue )
              m_ui->m_comboPositiveSign, m_ui->m_buttonDefaultPositiveSign );
     m_kcmLocale->setPositiveSign( m_kcmSettings.readEntry( "PositiveSign", QString() ) );
 
-    // Update the monetary format samples to relect new setting
+    // Update the format samples to relect new setting
+    initNumericDigitGrouping();
+    initMonetaryDigitGrouping();
     initMonetaryPositiveFormat();
 }
 
@@ -1423,7 +1522,9 @@ void KCMLocale::setNumericPositiveSign( const QString &newValue )
                       m_ui->m_comboPositiveSign, m_ui->m_buttonDefaultPositiveSign );
     m_kcmLocale->setPositiveSign( m_kcmSettings.readEntry( "PositiveSign", QString() ) );
 
-    // Update the monetary format samples to relect new setting
+    // Update the format samples to relect new setting
+    initNumericDigitGrouping();
+    initMonetaryDigitGrouping();
     initMonetaryPositiveFormat();
 }
 
@@ -1517,6 +1618,9 @@ void KCMLocale::setNumericDigitSet( int newValue )
     setComboItem( "DigitSet", newValue,
                   m_ui->m_comboDigitSet, m_ui->m_buttonDefaultDigitSet );
     m_kcmLocale->setDigitSet( (KLocale::DigitSet) m_kcmSettings.readEntry( "DigitSet", 0 ) );
+
+    // Update the numeric format samples to relect new setting
+    initNumericDigitGrouping();
 }
 
 void KCMLocale::initCurrencyCode()
@@ -1632,10 +1736,50 @@ void KCMLocale::setCurrencySymbol( const QString &newValue )
     }
 
     // Update the monetary format samples to relect new setting
+    initMonetaryDigitGrouping();
     initMonetaryPositiveFormat();
     initMonetaryNegativeFormat();
 }
 
+void KCMLocale::initMonetaryDigitGrouping()
+{
+    m_ui->m_comboMonetaryDigitGrouping->blockSignals( true );
+
+    m_ui->m_labelMonetaryDigitGrouping->setText( ki18n( "Digit grouping:" ).toString( m_kcmLocale ) );
+    QString helpText = ki18n( "<p>Here you can define the digit grouping used to display monetary"
+                              "values.</p><p>Note that the digit grouping used to display "
+                              "other numbers has to be defined separately (see the 'Numbers' tab)."
+                              "</p>" ).toString( m_kcmLocale );
+    m_ui->m_comboMonetaryDigitGrouping->setToolTip( helpText );
+    m_ui->m_comboMonetaryDigitGrouping->setWhatsThis( helpText );
+
+    initDigitGroupingCombo( m_ui->m_comboMonetaryDigitGrouping, "MonetaryDigitGroupFormat" );
+
+    setMonetaryDigitGrouping( m_kcmSettings.readEntry( "MonetaryDigitGroupFormat", "3" ) );
+
+    m_ui->m_comboMonetaryDigitGrouping->blockSignals( false );
+}
+
+void KCMLocale::defaultMonetaryDigitGrouping()
+{
+    setMonetaryDigitGrouping( m_defaultSettings.readEntry( "MonetaryDigitGroupFormat", "3" ) );
+}
+
+void KCMLocale::changedMonetaryDigitGroupingIndex( int index )
+{
+    setMonetaryDigitGrouping( m_ui->m_comboMonetaryDigitGrouping->itemData( index ).toString() );
+}
+
+void KCMLocale::setMonetaryDigitGrouping( const QString &newValue )
+{
+    setComboItem( "MonetaryDigitGroupFormat", newValue,
+                  m_ui->m_comboMonetaryDigitGrouping, m_ui->m_buttonDefaultMonetaryDigitGrouping );
+
+    // No api to set, so need to force reload the locale
+    m_kcmConfig->markAsClean();
+    m_kcmLocale->setCountry( m_kcmSettings.readEntry( "Country", QString() ), m_kcmConfig.data() );
+}
+
 void KCMLocale::initMonetaryThousandsSeparator()
 {
     m_ui->m_comboMonetaryThousandsSeparator->blockSignals( true );
@@ -1679,6 +1823,7 @@ void KCMLocale::changedMonetaryThousandsSeparator( const QString &newValue )
                                                              .remove( QString::fromLatin1("$0") ) );
 
     // Update the monetary format samples to relect new setting
+    initMonetaryDigitGrouping();
     initMonetaryPositiveFormat();
     initMonetaryNegativeFormat();
 }
@@ -1726,6 +1871,7 @@ void KCMLocale::changedMonetaryDecimalSymbol( const QString &newValue )
     m_kcmLocale->setMonetaryDecimalSymbol( m_kcmSettings.readEntry( "MonetaryDecimalSymbol", QString() ) );
 
     // Update the monetary format samples to relect new setting
+    initMonetaryDigitGrouping();
     initMonetaryPositiveFormat();
     initMonetaryNegativeFormat();
 }
@@ -1737,6 +1883,7 @@ void KCMLocale::setMonetaryDecimalSymbol( const QString &newValue )
     m_kcmLocale->setMonetaryDecimalSymbol( m_kcmSettings.readEntry( "MonetaryDecimalSymbol", QString() ) );
 
     // Update the monetary format samples to relect new setting
+    initMonetaryDigitGrouping();
     initMonetaryPositiveFormat();
     initMonetaryNegativeFormat();
 }
@@ -1776,6 +1923,7 @@ void KCMLocale::setMonetaryDecimalPlaces( int newValue )
     m_kcmLocale->setMonetaryDecimalPlaces( m_kcmSettings.readEntry( "MonetaryDecimalPlaces", 0 ) );
 
     // Update the monetary format samples to relect new setting
+    initMonetaryDigitGrouping();
     initMonetaryPositiveFormat();
     initMonetaryNegativeFormat();
 }
@@ -2089,6 +2237,11 @@ void KCMLocale::setMonetaryDigitSet( int newValue )
     setComboItem( "MonetaryDigitSet", newValue,
                   m_ui->m_comboMonetaryDigitSet, m_ui->m_buttonDefaultMonetaryDigitSet );
     m_kcmLocale->setMonetaryDigitSet( (KLocale::DigitSet) m_kcmSettings.readEntry( "MonetaryDigitSet", 0 ) );
+
+    // Update the monetary format samples to relect new setting
+    initMonetaryDigitGrouping();
+    initMonetaryPositiveFormat();
+    initMonetaryNegativeFormat();
 }
 
 void KCMLocale::initCalendarSystem()
diff --git a/kcontrol/locale/kcmlocale.h b/kcontrol/locale/kcmlocale.h
index 3289b07..50c122b 100644
--- a/kcontrol/locale/kcmlocale.h
+++ b/kcontrol/locale/kcmlocale.h
@@ -138,6 +138,10 @@ private:
     void initSeparatorCombo( KComboBox *separatorCombo );
     void initWeekDayCombo( KComboBox *dayCombo );
     void initDigitSetCombo( KComboBox *digitSetCombo );
+    void initDigitGroupingCombo( KComboBox *digitGroupingCombo, const QString &digitGroupingKey);
+    void insertDigitGroupingItem( KComboBox *digitGroupingCombo,
+                                  KSharedConfigPtr groupingConfig, KConfigGroup *groupingSettings,
+                                  const QString &digitGroupingKey, const QString &digitGroupingFormat);
     void insertMonetaryPositiveFormat( bool prefixCurrencySymbol, KLocale::SignPosition signPosition );
     void insertMonetaryNegativeFormat( bool prefixCurrencySymbol, KLocale::SignPosition signPosition );
 
@@ -164,6 +168,9 @@ private:
 
     //Numeric tab
 
+    void initNumericDigitGrouping();
+    void setNumericDigitGrouping( const QString &newValue );
+
     void initNumericThousandsSeparator();
     void setNumericThousandsSeparator( const QString &newValue );
 
@@ -190,6 +197,9 @@ private:
     void initCurrencySymbol();
     void setCurrencySymbol( const QString &newValue );
 
+    void initMonetaryDigitGrouping();
+    void setMonetaryDigitGrouping( const QString &newValue );
+
     void initMonetaryThousandsSeparator();
     void setMonetaryThousandsSeparator( const QString &newValue );
 
@@ -285,6 +295,9 @@ private Q_SLOTS:
 
     //Numeric tab
 
+    void defaultNumericDigitGrouping();
+    void changedNumericDigitGroupingIndex( int index );
+
     void defaultNumericThousandsSeparator();
     void changedNumericThousandsSeparator( const QString &newValue );
 
@@ -311,6 +324,9 @@ private Q_SLOTS:
     void defaultCurrencySymbol();
     void changedCurrencySymbolIndex( int index );
 
+    void defaultMonetaryDigitGrouping();
+    void changedMonetaryDigitGroupingIndex( int index );
+
     void defaultMonetaryThousandsSeparator();
     void changedMonetaryThousandsSeparator( const QString &newValue );
 
diff --git a/kcontrol/locale/kcmlocalewidget.ui b/kcontrol/locale/kcmlocalewidget.ui
index ed683b3..db7494e 100644
--- a/kcontrol/locale/kcmlocalewidget.ui
+++ b/kcontrol/locale/kcmlocalewidget.ui
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>702</width>
-    <height>408</height>
+    <height>439</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -158,6 +158,30 @@
         <enum>QFormLayout::ExpandingFieldsGrow</enum>
        </property>
        <item row="0" column="0">
+        <widget class="QLabel" name="m_labelNumericDigitGrouping">
+         <property name="text">
+          <string>Digit grouping:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1">
+        <layout class="QHBoxLayout" name="horizontalLayout_28">
+         <item>
+          <widget class="KComboBox" name="m_comboNumericDigitGrouping">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="KPushButton" name="m_buttonDefaultNumericDigitGrouping"/>
+         </item>
+        </layout>
+       </item>
+       <item row="1" column="0">
         <widget class="QLabel" name="m_labelThousandsSeparator">
          <property name="toolTip">
           <string/>
@@ -173,7 +197,7 @@
          </property>
         </widget>
        </item>
-       <item row="0" column="1">
+       <item row="1" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_12">
          <item>
           <widget class="KComboBox" name="m_comboThousandsSeparator">
@@ -193,7 +217,7 @@
          </item>
         </layout>
        </item>
-       <item row="1" column="0">
+       <item row="2" column="0">
         <widget class="QLabel" name="m_labelDecimalSymbol">
          <property name="toolTip">
           <string/>
@@ -209,7 +233,7 @@
          </property>
         </widget>
        </item>
-       <item row="1" column="1">
+       <item row="2" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_14">
          <item>
           <widget class="KComboBox" name="m_comboDecimalSymbol">
@@ -229,7 +253,7 @@
          </item>
         </layout>
        </item>
-       <item row="2" column="0">
+       <item row="3" column="0">
         <widget class="QLabel" name="m_labelDecimalPlaces">
          <property name="toolTip">
           <string/>
@@ -248,7 +272,7 @@
          </property>
         </widget>
        </item>
-       <item row="2" column="1">
+       <item row="3" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_13">
          <item>
           <widget class="KIntNumInput" name="m_intDecimalPlaces">
@@ -277,7 +301,7 @@
          </item>
         </layout>
        </item>
-       <item row="3" column="0">
+       <item row="4" column="0">
         <widget class="QLabel" name="m_labelPositiveFormat">
          <property name="toolTip">
           <string/>
@@ -293,7 +317,7 @@
          </property>
         </widget>
        </item>
-       <item row="3" column="1">
+       <item row="4" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_11">
          <item>
           <widget class="KComboBox" name="m_comboPositiveSign">
@@ -319,7 +343,7 @@
          </item>
         </layout>
        </item>
-       <item row="4" column="0">
+       <item row="5" column="0">
         <widget class="QLabel" name="m_labelNegativeFormat">
          <property name="toolTip">
           <string/>
@@ -335,7 +359,7 @@
          </property>
         </widget>
        </item>
-       <item row="4" column="1">
+       <item row="5" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_10">
          <item>
           <widget class="KComboBox" name="m_comboNegativeSign">
@@ -361,7 +385,7 @@
          </item>
         </layout>
        </item>
-       <item row="5" column="0">
+       <item row="6" column="0">
         <widget class="QLabel" name="m_labelDigitSet">
          <property name="toolTip">
           <string/>
@@ -377,7 +401,7 @@
          </property>
         </widget>
        </item>
-       <item row="5" column="1">
+       <item row="6" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_16">
          <item>
           <widget class="KComboBox" name="m_comboDigitSet">
@@ -483,6 +507,30 @@
         </layout>
        </item>
        <item row="2" column="0">
+        <widget class="QLabel" name="m_labelMonetaryDigitGrouping">
+         <property name="text">
+          <string>Digit grouping:</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1">
+        <layout class="QHBoxLayout" name="horizontalLayout_38">
+         <item>
+          <widget class="KComboBox" name="m_comboMonetaryDigitGrouping">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="KPushButton" name="m_buttonDefaultMonetaryDigitGrouping"/>
+         </item>
+        </layout>
+       </item>
+       <item row="3" column="0">
         <widget class="QLabel" name="m_labelMonetaryThousandsSeparator">
          <property name="toolTip">
           <string/>
@@ -501,7 +549,7 @@
          </property>
         </widget>
        </item>
-       <item row="2" column="1">
+       <item row="3" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_4">
          <item>
           <widget class="KComboBox" name="m_comboMonetaryThousandsSeparator">
@@ -521,7 +569,7 @@
          </item>
         </layout>
        </item>
-       <item row="3" column="0">
+       <item row="4" column="0">
         <widget class="QLabel" name="m_labelMonetaryDecimalSymbol">
          <property name="toolTip">
           <string/>
@@ -540,7 +588,7 @@
          </property>
         </widget>
        </item>
-       <item row="3" column="1">
+       <item row="4" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_3">
          <item>
           <widget class="KComboBox" name="m_comboMonetaryDecimalSymbol">
@@ -560,7 +608,7 @@
          </item>
         </layout>
        </item>
-       <item row="4" column="0">
+       <item row="5" column="0">
         <widget class="QLabel" name="m_labelMonetaryDecimalPlaces">
          <property name="toolTip">
           <string/>
@@ -579,7 +627,7 @@
          </property>
         </widget>
        </item>
-       <item row="4" column="1">
+       <item row="5" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_5">
          <item>
           <widget class="KIntNumInput" name="m_intMonetaryDecimalPlaces">
@@ -608,7 +656,7 @@
          </item>
         </layout>
        </item>
-       <item row="5" column="0">
+       <item row="6" column="0">
         <widget class="QLabel" name="m_labelMonetaryPositiveFormat">
          <property name="toolTip">
           <string/>
@@ -624,7 +672,7 @@
          </property>
         </widget>
        </item>
-       <item row="5" column="1">
+       <item row="6" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_6">
          <item>
           <widget class="KComboBox" name="m_comboMonetaryPositiveFormat">
@@ -647,7 +695,7 @@
          </item>
         </layout>
        </item>
-       <item row="6" column="0">
+       <item row="7" column="0">
         <widget class="QLabel" name="m_labelMonetaryNegativeFormat">
          <property name="toolTip">
           <string/>
@@ -663,7 +711,7 @@
          </property>
         </widget>
        </item>
-       <item row="6" column="1">
+       <item row="7" column="1">
         <layout class="QHBoxLayout" name="horizontalLayout_7">
          <item>
           <widget class="KComboBox" name="m_comboMonetaryNegativeFormat">
@@ -686,24 +734,7 @@
          </item>
         </layout>
        </item>
-       <item row="7" column="1">
-        <layout class="QHBoxLayout" name="horizontalLayout_8">
-         <item>
-          <widget class="KComboBox" name="m_comboMonetaryDigitSet">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="KPushButton" name="m_buttonDefaultMonetaryDigitSet"/>
-         </item>
-        </layout>
-       </item>
-       <item row="7" column="0">
+       <item row="8" column="0">
         <widget class="QLabel" name="m_labelMonetaryDigitSet">
          <property name="toolTip">
           <string/>
@@ -722,6 +753,23 @@
          </property>
         </widget>
        </item>
+       <item row="8" column="1">
+        <layout class="QHBoxLayout" name="horizontalLayout_8">
+         <item>
+          <widget class="KComboBox" name="m_comboMonetaryDigitSet">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="KPushButton" name="m_buttonDefaultMonetaryDigitSet"/>
+         </item>
+        </layout>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="m_tabCalendar">
diff --git a/l10n/C/entry.desktop b/l10n/C/entry.desktop
index 83ccd84..9042333 100644
--- a/l10n/C/entry.desktop
+++ b/l10n/C/entry.desktop
@@ -99,6 +99,7 @@ LanguageSensitiveDigits=true
 
 DecimalPlaces=2
 DecimalSymbol=.
+DigitGroupFormat=3
 ThousandsSeparator=,
 PositiveSign=
 NegativeSign=-
@@ -109,6 +110,7 @@ CurrencyCodesInUse=USD
 #CurrencySymbol=$ Don't default as will use default for CurrencyCode
 MonetaryDecimalPlaces=2
 MonetaryDecimalSymbol=.
+MonetaryDigitGroupFormat=3
 MonetaryThousandsSeparator=,
 PositivePrefixCurrencySymbol=true
 NegativePrefixCurrencySymbol=true


More information about the kde-doc-english mailing list