Apache OpenOffice (AOO) Bugzilla – Issue 32386
Autocorrect files and ISO codes?
Last modified: 2013-08-07 15:00:08 UTC
Hi, autocorrect files, ie. extras/source/autotext/lang/pt-BR/acor1046.dat contain the MS LCID codes in their names. What about using ISO codes instead in 2.0 so we reduce the "another-naming-scheme-for-localized-files"?
From a first glance there is only one code place to change: svx/source/editeng/svxacorr.cxx method SvxAutoCorrect::GetAutoCorrFileName() should simply use ConvertLanguageToIsoString(eLang) instead of String::CreateFromInt32(eLang) The old offmgr code is gone, and also setup2 will be removed for OOo2.0, though a native setup will have to handle these files as well, of course. Cc'ing Oliver Specht on this, since he's the owner of AutoCorrection. Tom, Oliver: feasible for OOo2.0?
os: No problem with me
OK, let's do it.
tv: I'd like to suggest one more unification. autocorr directory in the installed OOo doesn't contain directories like en, cs, ..., but all files in the same directory: pavel@pavel:~/OpenOffice.org680/share/autocorr> ls -1 acor1033.dat acor2057.dat Other directories, like template, samples, autotext and wordbook contain such directories. What about unifying it too? Should be almost trivial and it would also make OOo source unified - all autocorr files will be named the same in separate language dependent directory - named according to ISO codes.
->pjanik: The difference to templates and samples is that you may have autocorrection files for more than the installation language. You would end up having tons of directories each containing one file.
os: right. Maybe in the future, we will support more autocorr files. But you are right. It is not needed right now. I primarily wanted to have the same structure for extras/... in the sources.
We do support more autocorr files already. They are not installed but they are created once you use the AutoCorrect dialog with a different language selection.
Oliver, Tom, For cosmetical reasons I suggest to insert an underscore before the locale string, so the file name would be acor_en-US.dat, for example. Doing so might also help in not accidentally generating names that have some questionable meaning in one or the other language.. Eike
TV: Good idea, Eike. Lets make it so if Oliver does not object.
TV: fixed in CWS extras16
TV: verified ok in CWS extras16.
TV: Its in the master and ok -> closed