Incomplete sentences incompatible with SOV type languages

Hi there,

Lately I’ve been working on localization into Japanese, and I’m stuck with cases where the order of strings seems to be fixed on UI and the strings cannot be properly localized.

The issue I mean exists for strings like:

  • You can
  • Prepositions such as from, to, at, on, in, of, by
  • Send to (
  • says: (core.viewers.comments.add.says)
  • edited by (editedby)
  • Posted by (
  • Switch to (switchto)
  • attached by (attachedby)

I don’t know the exact number of the strings which should be taken care of, but as far as I checked there seems to be a lot of them.

While they work for languages whose grammar is Subject + Verb + Object (English, French, German, etc), it does not really work for languages with Subject + Object + Verb structure (Japanese, Korean, etc).

The apparent solution would be use a variable inside a complete sentence, like: Sign in @ Element Translations

(Context: You're invited to talk on Matrix. Please ask Mr. Clement for permission to join the room)

If you are talking about translations where the source is edited by {0}. you can actually put the{0} placeholder anywhere you want. See for example XWiki Platform/XWiki.Notifications.Code.Translations — Chinese (Simplified) (zh) @ Weblate edited by {0}.

Hi, actually the source is edited by, without the placeholder.

Mr Simon Urli told me here that using complete sentences with placeholder(s) is the best practice right now, and I’m wondering if the old localizations have been removed from the current UI already.

What is the key of this one ?

Yes, using variables for use cases like this is definitely the current standard (and has been for quite a while now), and any translation that does not do that would be a bug.

Unfortunately, also contains deprecated translations that we did not find how to tag clearly as such yet.

It is editedby. I guess you should be able to find it around xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/, string 145, according to the string information on Weblate.

Also is it safe to disregard the keys made of purely prepositions such as from, to, at, on, in, of, by since I guess they are included in a complete sentence?

I can confirm you that this one is quite old, but it’s officially not deprecated right now, so it might be used somewhere (which is something that we need to fix IMO, but I could not find where with a quick search, so it’s possible we just need to move it to the deprecated section).

If those are still used, they are bugs to fix too, IMO. In fact, several are defined in the same location as editedby, see xwiki-platform/ at master · xwiki/xwiki-platform · GitHub

I understood. I left a comment on the open issue here: