Fix "byte order marker" -> "byte order mark", use upper-case "Unicode" name
ClosedPublic

Authored by kossebau on Jan 7 2017, 5:15 PM.

Details

Summary

The official names are "byte order mark" and "Unicode".

Also consistently use "(BOM)" addition in UI actions/config entries,
helps people looking just for "BOM"

Diff Detail

Repository
R39 KTextEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau updated this revision to Diff 9821.Jan 7 2017, 5:15 PM
kossebau retitled this revision from to Fix "byte order marker" -> "byte order mark", use upper-case "Unicode" name.
kossebau updated this object.
kossebau added a reviewer: Kate.
Restricted Application added a project: Frameworks. · View Herald TranscriptJan 7 2017, 5:15 PM
Restricted Application added subscribers: Frameworks, kwrite-devel. · View Herald Transcript

For KF 30+, to give translators a chance.

Guess the wrong naming is my fault, fixing that is a good idea.
Perhaps for the mode line, just add the "byte-order-mark" as alternative (and keep the old one to be compatible)?

Guess the wrong naming is my fault, fixing that is a good idea.
Perhaps for the mode line, just add the "byte-order-mark" as alternative (and keep the old one to be compatible)?

For now just left the TODO comment, as I personally do not use kate tag lines (I know, I know), so cannot really judge how much pain it would become when working on same documents with old and new Kate apps/parts, where the new Kate uses "byte-order-mark" and the old ones does not know about it? If that is acceptable pain, just tell and I will give the needd code a try :)

dhaumann accepted this revision.Jan 8 2017, 11:31 AM
dhaumann added a reviewer: dhaumann.
dhaumann added a subscriber: dhaumann.

Two thinkgs:

  1. Please address the comments from Christoph and myself
  2. Please adapt in kate.git: kate/docs/
src/document/katedocument.cpp
4587

Yes, please add backwards compatibility:

} else if (var == QLatin1String("bom") || var == QLatin1String("byte-order-mark") || var == QLatin1String("byte-order-marker")) {

src/variableeditor/variablelineedit.cpp
161–162

rename comment to "byte-order-mark"

161–162

Rename to "byte-order-mark"

This revision is now accepted and ready to land.Jan 8 2017, 11:31 AM

Clicked "Submit" too fast.

Please adapt in kate.git: kate/docs/katepart/configuring.docbook: There, "byte-order-marker" appears two times, and need to be renamed to "byte-order-mark".

kossebau updated this revision to Diff 9849.Jan 8 2017, 12:49 PM
kossebau marked 3 inline comments as done.
kossebau edited edge metadata.

rename modline var + backward compat code

This revision was automatically updated to reflect the committed changes.