Created attachment 184167 [details] sample file with issue String used in subtotals is hard to translate, given the mathematical functions used. This is the typical case of assembling a string concatenating words, which is bad. Offending string is STR_TABLE_GRAND aka "Grand" in https://translations.documentfoundation.org/translate/libo_ui-master/scmessages/pt_BR/?checksum=745b915bc731ac01&q=+source%3AGrand+&sort_by=-priority%2Cposition "Grand Sum" is better translated as "Total geral" and can be "Soma geral" "Grand Average" is better translated as "Média geral" ... In general, translation of "Grand "+<subtotal function> is <subtotal function> + "geral" for Brazilian Portuguese, Portuguese and may be other language. The attachment has the issue shown in the bottom of the "Subtotal" sheet.
I agree with this request. The way the code was created may work well in English, but in other languages it wouldn't be fine. For example, as pointed out by Olivier, in "Grand Average" the word "Grand" would come second in the translation "Média Geral". See the code here: https://opengrok.libreoffice.org/xref/core/sc/source/core/data/table3.cxx?r=a6ec933d#2267 The word "Grand" coming first is hardcoded. To fix this we would have to create a separate string for all possible functions that can be used. For a list, see here: https://opengrok.libreoffice.org/xref/core/sc/source/core/data/table3.cxx?r=a6ec933d#2038 For instance, we could have a STR_TABLE_GRAND_AVG, STR_TABLE_GRAND_COUNT and so on.
Proposed patch available for review here: https://gerrit.libreoffice.org/c/core/+/144666
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f5b3bfbded8ea8d4a0b854a62c82b66747b45833 tdf#152535 Provide better localization for "Grand" subtotal strings It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
This seems to have been one half of the bug 114696