client icon indicating copy to clipboard operation
client copied to clipboard

Unify enum translations by using enumDisplayName

Open TheOneRing opened this issue 4 years ago • 4 comments

Some enums are translated to display strings in multiple locations and differently each time. Port them to enumDisplayName and unify them.

See https://github.com/owncloud/client/blob/f29c794c5b4bca37190911cb2acd60b737498805/src/libsync/syncfileitem.h#L285 https://github.com/owncloud/client/blob/f29c794c5b4bca37190911cb2acd60b737498805/src/libsync/syncfileitem.cpp#L78-L84

for an example.

TheOneRing avatar Sep 17 '21 08:09 TheOneRing

Hello, I am interested in working on this. Can you explain the issue with a little more detail? Mainly, where in the code, the problem is located? Thank you

kitsiosvas avatar Jan 27 '22 00:01 kitsiosvas

@kitsiosvas there should be one utility function per enum only that converts the enum into user-readable strings. It makes no sense to do that more than once in various locations.

fmoc avatar Jan 27 '22 09:01 fmoc

One example of such an duplication is: https://github.com/owncloud/client/blob/b26ffe42ccc8c43f2f225831bee477bacf035a5e/src/libsync/syncresult.cpp#L37 and https://github.com/owncloud/client/blob/724f7c8f97a3d9cb18d821942132762dade12c04/src/libsync/theme.cpp#L95 But I'm sure there are more.

TheOneRing avatar Jan 27 '22 09:01 TheOneRing

The issue is still open. What do you want to know?

fmoc avatar Sep 15 '22 08:09 fmoc