Open stefan-niedermann opened 3 years ago
Hello @stefan-niedermann ,
no problems to mention me at GitHub.
Just did a quick search and have not been able to find given string at Transifex ...
Which version are you using? latest greatest?
Cheers
3.14.1, i think it's the latest released version an F-Droid.
Maybe it's a concatenated string? ("Textdokument" could be a parameter)
it is concatenated:
OCFileListBottomSheetDialog.java
line ~114 ff.
creatorViewBinding.creatorName.setText(
String.format(fileActivity.getString(R.string.editor_placeholder),
fileActivity.getString(R.string.create_new),
creator.getName()));
with editor placeholder being
%1$s %2$s
So you can't you anything about this, looping in @tobiasKaminsky I think we could fix this be rather using a string with a single placeholder for the document type being created by the respective menu item so order of words can be language depended and be handled by the translator :)
So should be doable, but needs a code change
Concatenated strings are evil 👿
Or just a colon :
before the type of the document?
Or just a colon : before the type of the document?
Nope that'll probably won't work for R-T-L languages
... I guess
Why not? the default string could be %1$s: %2$s
and a translation of a R-T-L language can be %2$s :%1$s
- though i think the browser Android should handle that still correctly :man_shrugging:
ah, well %1$s %2$s
is currently flagged as translatable=false
which kind of makes sense this a pure placeholder file is impossible to translate with a description of the actual usage scenario :/ I still think a string with one placeholder solves the problem just fine and is easy to understand for the translators.
I think both approaches work, but having there a colon, when we have it nowhere else feels a bit off
(just for showing how it is handled with other filetypes)
So I would go with Andy's idea. Please use new string names, as otherwise it will create trouble with non-updated languages.
We have many many strings at Transifex like "Create new folder", "Create new foobar". Without using any placeholder.
Using more than one should be avoided for such strings.
Jm2c.
Using more than one should be avoided for such strings.
Create new %1s
@rakekniven how do you deal with the thing in @tobiasKaminsky's screenshot e.g. table and document since:
English:
German
So a placeholder won't work and I can't say if this is even more complex in other languages...
Oh, forgot to edit my previous posting. Same thought as yours (👍 ) came to my mind. Please do not use any placeholder at all. Make single strings for each
@stefan-niedermann Ok for you?
Fine for me 🙂
Please do not use any placeholder at all. Make single strings for each
* Create new document * Create new spreadsheet * Create new presentation * ...
Unfortunately this does not work, as we get this directly via api, and e.g. text could add new templates and thus new "create text xyz" can appear.
I wonder why this is only happening on Android/german.
@tobiasKaminsky it is probably happening on iOS too I guess and I would guess that the translation needs to be handled as described for the server-repo :)
@juliushaertl do you know how this is done on server side?
Not the same on iOS when using Only Office.
The app:
Transifex:
@rakekniven is this OnlyOffice or Collabora?
@tobiasKaminsky please see: https://github.com/nextcloud/android/blob/master/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java#L113-L116 we do not use these translations but build the strings via concatination
@rakekniven is this OnlyOffice or Collabora?
OnlyOffice
@tobiasKaminsky please see: https://github.com/nextcloud/android/blob/master/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java#L113-L116 we do not use these translations but build the strings via concatination
Right, this is what I said already:
Unfortunately this does not work, as we get this directly via api, and e.g. text could add new templates and thus new "create text xyz" can appear.
It is strange that on iOS with directEditing (so Text or OnlyOffice) they can use real strings. Found it: https://github.com/nextcloud/ios/blob/b57a6b8657b622c02d2d88417225334e9f2cbcd6/iOSClient/Main/Menu/AppDelegate%2BMenu.swift#L213
There it is hardcoded…
@juliushaertl can we add those info of directEditing directly in server response? Endpoint is:
/ocs/v2.php/apps/files/api/v1/directEditing
So that there is a new "text", which shows translated, e.g. "Neues Tabellendokument erstellen".
@AndyScherzinger I remember that we discussed in last design call, to remove this whole "create new", but only use the "names", e.g. Spreadsheet or Document.
This would also solve the problem, or?
@tobiasKaminsky Yes that would solve it for the bottom sheet, but it might come back for the template selection screen, see latest template select dialog PR while we could solve it with a more generic dialog title then.
but it might come back for the template selection screen
Then server should provide us a good translation.
Then server should provide us a good translation.
Absolutely 👍
cc @rakekniven - sorry, didn't know how to properly notify you...
In the Nextcloud Android app click on the
+
-button."Neu erstellen Textdokument" looks wrong. Either