Bug 387120 - Untranslatable placeholders in csv importer
Summary: Untranslatable placeholders in csv importer
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 4.8.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks: 403474
  Show dependency treegraph
 
Reported: 2017-11-19 18:04 UTC by Burkhard Lück
Modified: 2019-01-26 21:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
error dialog csv import (50.82 KB, image/png)
2017-11-25 10:21 UTC, Burkhard Lück
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Burkhard Lück 2017-11-19 18:04:36 UTC
These placeholders %1 in the csv import modul are untranslatable in master + stbale:

./bankingwizardpage.cpp:147:      rc = KMessageBox::questionYesNo(m_dlg, i18n("<center>The '<b>%1</b>' field already has this column selected.</center>"
./bankingwizardpage.cpp-148-                                              "<center>If you wish to copy the Payee data to the memo field, click 'Yes'.</center>",
./bankingwizardpage.cpp-149-                                              m_dlg->m_colTypeName.value(m_profile->m_colNumType.value(col))));
--
./bankingwizardpage.cpp:301:    KMessageBox::information(m_dlg, i18n("The '<b>%1</b>' field already has this column selected. <center>Please reselect both entries as necessary.</center>",
./bankingwizardpage.cpp-302-                                     m_dlg->m_colTypeName.value(m_profile->m_colNumType.value(col))));
--
./priceswizardpage.cpp:163:    KMessageBox::information(m_dlg, i18n("The '<b>%1</b>' field already has this column selected. <center>Please reselect both entries as necessary.</center>",
./priceswizardpage.cpp-164-                                            m_dlg->m_colTypeName.value(colNumType.value(col))));
--
./investmentwizardpage.cpp:187:      rc = KMessageBox::questionYesNo(m_dlg, i18n("<center>The '<b>%1</b>' field already has this column selected.</center>"
./investmentwizardpage.cpp-188-                                              "<center>If you wish to copy that data to the memo field, click 'Yes'.</center>",
./investmentwizardpage.cpp-189-                                              m_dlg->m_colTypeName.value(m_profile->m_colNumType.value(col))));
--
./investmentwizardpage.cpp:465:    KMessageBox::information(m_dlg, i18n("The '<b>%1</b>' field already has this column selected. <center>Please reselect both entries as necessary.</center>",
./investmentwizardpage.cpp-466-                                     m_dlg->m_colTypeName.value(m_profile->m_colNumType.value(col))));
Comment 1 Thomas Baumgart 2017-11-24 17:43:46 UTC
I must be missing something, but I do see them translatable (here for example from the bankingwizardpage.cpp, the others are similar):

  // initialize column names
  m_dlg->m_colTypeName.insert(Column::Payee,i18n("Payee"));
  m_dlg->m_colTypeName.insert(Column::Number,i18n("Number"));
  m_dlg->m_colTypeName.insert(Column::Debit,i18n("Debit"));
  m_dlg->m_colTypeName.insert(Column::Credit,i18n("Credit"));
  m_dlg->m_colTypeName.insert(Column::Date,i18n("Date"));
  m_dlg->m_colTypeName.insert(Column::Amount,i18n("Amount"));
  m_dlg->m_colTypeName.insert(Column::Category,i18n("Category"));
  m_dlg->m_colTypeName.insert(Column::Memo,i18n("Memo"));

What is it, that I don't see?
Comment 2 Burkhard Lück 2017-11-25 10:21:05 UTC
Created attachment 109054 [details]
error dialog csv import

@Thomas Baumgart: you look at the wrong strings, see attached screenshot
Comment 3 Thomas Baumgart 2017-11-25 11:17:23 UTC
@Burkhard Lueck: I looked at the right one, but did so in master. The problem only exists in 4.8.x as the CSV importer looks a bit different in KF5. My code referred to the KF5 (aka master) branch.
Comment 4 Ralf Habacker 2018-02-18 19:30:07 UTC
The related code is: 

cvsdialog.cpp:1786
    KMessageBox::information(0, i18n("<center>The '<b>%1</b>' field already has this column selected.</center>"
                                     "<center>Please reselect both entries as necessary.</center>", m_columnTypeList[col]));

where m_columnTypeList[col] contains untranslated entries. Should they be wrapped with an i18n() call ?
Comment 5 Ralf Habacker 2019-01-26 21:56:20 UTC
Got no answer, will be retested with 4.8.4