Changeset View
Changeset View
Standalone View
Standalone View
src/editortab.cpp
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Line(s) | 165 | { | |||
---|---|---|---|---|---|
171 | 171 | | |||
172 | connect(m_catalog,&Catalog::signalNumberOfFuzziesChanged,this,&EditorTab::numberOfFuzziesChanged); | 172 | connect(m_catalog,&Catalog::signalNumberOfFuzziesChanged,this,&EditorTab::numberOfFuzziesChanged); | ||
173 | connect(m_catalog,&Catalog::signalNumberOfEmptyChanged,this,&EditorTab::numberOfUntranslatedChanged); | 173 | connect(m_catalog,&Catalog::signalNumberOfEmptyChanged,this,&EditorTab::numberOfUntranslatedChanged); | ||
174 | } | 174 | } | ||
175 | 175 | | |||
176 | #ifndef NOKDE | 176 | #ifndef NOKDE | ||
177 | void LokalizeSubwindowBase::reflectNonApprovedCount(int count, int total) | 177 | void LokalizeSubwindowBase::reflectNonApprovedCount(int count, int total) | ||
178 | { | 178 | { | ||
179 | QString text=i18nc("@info:status message entries\n'fuzzy' in gettext terminology","Not ready: %1", count); | 179 | QString text=i18nc("@info:status message entries\n'fuzzy' in gettext terminology","Not ready: %1", QLocale().toString(count)); | ||
180 | if (count && total) | 180 | if (count && total) | ||
181 | text+=i18nc("percentages in statusbar", " (%1%)", int(100.0*count/total)); | 181 | text+=i18nc("percentages in statusbar", " (%1%)", int(100.0*count/total)); | ||
182 | statusBarItems.insert(ID_STATUS_FUZZY,text); | 182 | statusBarItems.insert(ID_STATUS_FUZZY,text); | ||
183 | } | 183 | } | ||
184 | 184 | | |||
185 | void LokalizeSubwindowBase::reflectUntranslatedCount(int count, int total) | 185 | void LokalizeSubwindowBase::reflectUntranslatedCount(int count, int total) | ||
186 | { | 186 | { | ||
187 | QString text=i18nc("@info:status message entries","Untranslated: %1", count); | 187 | QString text=i18nc("@info:status message entries","Untranslated: %1", QLocale().toString(count)); | ||
188 | if (count && total) | 188 | if (count && total) | ||
189 | text+=i18nc("percentages in statusbar", " (%1%)", int(100.0*count/total)); | 189 | text+=i18nc("percentages in statusbar", " (%1%)", int(100.0*count/total)); | ||
190 | statusBarItems.insert(ID_STATUS_UNTRANS,text); | 190 | statusBarItems.insert(ID_STATUS_UNTRANS,text); | ||
191 | } | 191 | } | ||
192 | #endif | 192 | #endif | ||
193 | 193 | | |||
194 | void EditorTab::numberOfFuzziesChanged() | 194 | void EditorTab::numberOfFuzziesChanged() | ||
195 | { | 195 | { | ||
▲ Show 20 Lines • Show All 670 Lines • ▼ Show 20 Line(s) | 820 | { | |||
866 | if (wasOpen) emit fileAboutToBeClosed(); | 866 | if (wasOpen) emit fileAboutToBeClosed(); | ||
867 | int errorLine=m_catalog->loadFromUrl(filePath,saidPath); | 867 | int errorLine=m_catalog->loadFromUrl(filePath,saidPath); | ||
868 | if (wasOpen&&errorLine==0) {emit fileClosed();emit fileClosed(prevFilePath);} | 868 | if (wasOpen&&errorLine==0) {emit fileClosed();emit fileClosed(prevFilePath);} | ||
869 | 869 | | |||
870 | QApplication::restoreOverrideCursor(); | 870 | QApplication::restoreOverrideCursor(); | ||
871 | 871 | | |||
872 | if (errorLine==0) | 872 | if (errorLine==0) | ||
873 | { | 873 | { | ||
874 | statusBarItems.insert(ID_STATUS_TOTAL,i18nc("@info:status message entries","Total: %1", m_catalog->numberOfEntries())); | 874 | statusBarItems.insert(ID_STATUS_TOTAL,i18nc("@info:status message entries","Total: %1", QLocale().toString(m_catalog->numberOfEntries()))); | ||
875 | numberOfUntranslatedChanged(); | 875 | numberOfUntranslatedChanged(); | ||
876 | numberOfFuzziesChanged(); | 876 | numberOfFuzziesChanged(); | ||
877 | 877 | | |||
878 | m_currentPos.entry=-1;//so the signals are emitted | 878 | m_currentPos.entry=-1;//so the signals are emitted | ||
879 | DocPosition pos(0); | 879 | DocPosition pos(0); | ||
880 | //we delay gotoEntry(pos) until project is loaded; | 880 | //we delay gotoEntry(pos) until project is loaded; | ||
881 | 881 | | |||
882 | //Project | 882 | //Project | ||
▲ Show 20 Lines • Show All 218 Lines • ▼ Show 20 Line(s) | 1080 | { | |||
1101 | emit signalBookmarkDisplayed(m_catalog->isBookmarked(pos.entry)); | 1101 | emit signalBookmarkDisplayed(m_catalog->isBookmarked(pos.entry)); | ||
1102 | 1102 | | |||
1103 | emit signalEquivTranslatedEntryDisplayed(m_catalog->isEquivTrans(pos)); | 1103 | emit signalEquivTranslatedEntryDisplayed(m_catalog->isEquivTrans(pos)); | ||
1104 | emit signalApprovedEntryDisplayed(m_catalog->isApproved(pos)); | 1104 | emit signalApprovedEntryDisplayed(m_catalog->isApproved(pos)); | ||
1105 | } | 1105 | } | ||
1106 | 1106 | | |||
1107 | } | 1107 | } | ||
1108 | 1108 | | |||
1109 | statusBarItems.insert(ID_STATUS_CURRENT,i18nc("@info:status","Current: %1", m_currentPos.entry+1)); | 1109 | statusBarItems.insert(ID_STATUS_CURRENT,i18nc("@info:status","Current: %1", QLocale().toString(m_currentPos.entry+1))); | ||
1110 | //qCDebug(LOKALIZE_LOG)<<"ELA "<<time.elapsed(); | 1110 | //qCDebug(LOKALIZE_LOG)<<"ELA "<<time.elapsed(); | ||
1111 | } | 1111 | } | ||
1112 | 1112 | | |||
1113 | void EditorTab::msgStrChanged() | 1113 | void EditorTab::msgStrChanged() | ||
1114 | { | 1114 | { | ||
1115 | bool isUntr=m_catalog->msgstr(m_currentPos).isEmpty(); | 1115 | bool isUntr=m_catalog->msgstr(m_currentPos).isEmpty(); | ||
1116 | bool isApproved=m_catalog->isApproved(m_currentPos); | 1116 | bool isApproved=m_catalog->isApproved(m_currentPos); | ||
1117 | if (isUntr==m_currentIsUntr && isApproved==m_currentIsApproved) | 1117 | if (isUntr==m_currentIsUntr && isApproved==m_currentIsApproved) | ||
▲ Show 20 Lines • Show All 604 Lines • Show Last 20 Lines |