-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Italian translation and sort baseline strings lexicographically #630
Conversation
…hically to simplify rebasing by translators
@andscape-dev could you please review as well? |
I'm in favor of lexicographic sorting, especially if we can enforce it with CI. |
Seems like spotless can do that for JSON :( https://github.com/diffplug/spotless/blob/main/plugin-gradle/README.md#json No luck finding something for XML so far |
Thanks for the updates! I'm fine with the lexicographical ordering, I use the Android Studio translations editor so I don't really touch the files manually anyway... Will this require translators to sort the files manually every time, though? Or can this be done automatically with some kind of auto-formatting? |
By the way, my local build is failing. "Unresolved reference: ic_launcher_foreground" in |
@andscape-dev I had this once, found the fix on stackoverflow. Clean gradle cache and then run invalidate caches and restart in android studio, iirc. @twizmwazin @andreaippo We use a prettier CI image to check our json and a lot more with all our lemmy projects. Looks like it has an xml plugin. I'm just not sure it would be very desirable tho, because every little translation addition would require us to manually fix the formatting. Contributers aren't going to install prettier and run it for us. |
I don't see a command to sort lexicographically, though :( Should we have to keep the file sorted manually, would that be a big deal? With Kate (and notepad++) it's a few clicks, I'd expect other IDEs to provide the same. |
@andreaippo AFAIK Android Studio doesn't have a feature to sort XML entries by tag value, and it is the standard IDE for Android. We can't force all contributors to use Android Studio, but we can assume most of them will. To me, keeping entries in the order they are added to the codebase seems the simplest solution. That way changes willl be clustered towards the bottom and therefore easier to review/merge. |
seems to be the best course of action at this point. I'm not sure I'd be willing to install (another) full IDE just for localization, a simple diff tool would be enough for me and for occasional contributors to the project as well, so I think that it's important that it's easy for everyone to compare with the baseline (English) file and see which strings have been added. And adding nodes in the middle of the file isn't well digested by a couple of diff tools I tried today, therefore using an "append-only" policy seems the best option for everyone. |
@andreaippo have you had time to take a look at my comments? They're minor suggestions, we can merge without them too... |
Hey, I can't seem to find any comments. Are they in the diff somewhere? |
Weird, I see them here in the thread as an open review... |
So yeah, I have no idea why, but Github was showing my review to me only, and not to anyone else... |
Happened to me all the time when I first started using Gitlab after a long period on BitBucket. In my case I had to submit/finalize my review, otherwise comments would stay private :D |
Awesome, LGTM! |
Great! @twizmwazin @dessalines we are ready for merge :) |
LemmyNet#630) * Update Italian localization and sort baseline strings file lexicographically to simplify rebasing by translators * Address review comments by @andscape-dev --------- Co-authored-by: Kevin Phoenix <kevin@kphoenix.us>
Update Italian translation:
Baseline strings file: