Open sanak opened 1 year ago
I tried the following on my local environment and could reproduce the same error message.
% git checkout master
% git pull
% git remote add weblate https://hosted.weblate.org/git/smash/smash-main-app/
% git remote update weblate
% git merge weblate/master
Auto-merging lib/l10n/intl_ja.arb
CONFLICT (content): Merge conflict in lib/l10n/intl_ja.arb
Automatic merge failed; fix conflicts and then commit the result.
The conflicts diff was as follows, so I guess that updating Weblate git is necessary related with PR:https://github.com/geopaparazzi/smash/pull/193.
Hi @sanak , I am not sure why this happened. Maybe because we removed some entries? Should we do that on weblate in future? Not sure.
Hi @moovida, (CC: @dkastl, @mbasa)
Maybe because we removed some entries? Should we do that on weblate in future?
I guess so.
Is it possible for you to update Hosted Weblate git master branch from GitHub master branch by force push ?
I guess that Hosted Weblate project/components admin privilege and Weblate Client commit/lock and pull/unlock operation may be necessary.
@sanak , you mean following the above workflow, right? Ok, I will try before leaving. Fingers crossed.
I am getting issues here when issuing: git remote update weblate
Fetching weblate
warning: no common commits
remote: Enumerating objects: 1208, done.
remote: Counting objects: 100% (1208/1208), done.
remote: Compressing objects: 100% (666/666), done.
remote: Total 1208 (delta 649), reused 859 (delta 447), pack-reused 0
Receiving objects: 100% (1208/1208), 5.54 MiB | 4.60 MiB/s, done.
Resolving deltas: 100% (649/649), done.
error: Could not read e2b99061bcbfcb04f801fa6daabb309994c78975
fatal: revision walk setup failed
error: https://hosted.weblate.org/git/smash/smash-main-app/ did not send all necessary objects
error: Could not fetch weblate
Testing this on the plugins project.
@sanak , you mean following the above workflow, right?
Well, my suggestion was opposite direction (GitHub => Weblate), but Weblate suggested workflow (Weblate => GitHub) is also okay and probably more safe. (But, I guess that latter way requires every languages conflicts, later.)
And okay about the above git remote update weblate
error...
Was able to add api key to the config. But I am still not getting anything from the wlc commands.
~/development/SMASH/smash_import_export_plugins >>> wlc commit
Error: No object passed on command line!
Okay, I will try wlc on my local environment, once. (I guess that wlc fetch operation should work with my account.) https://docs.weblate.org/en/latest/wlc.html#getting-started
@moovida
I guess that wlc commit
or other wlc
command requires translation project/component, so could you try the following once ?
wlc commit smash/smash-import-export-plugins
(On my local environment, it returns the following message, but I guess that it comes from my account's role.)
% wlc commit smash/smash-import-export-plugins
Error: Object not found on the server (maybe operation is not supported on the server)
By the way, I found the following past weblate issue, and deleting translation key may be better to be done via web interface with Cleanup addon... https://github.com/WeblateOrg/weblate/issues/1974
Deleting existing translation
seems to require Administration
or Manage languages
role (from https://docs.weblate.org/en/latest/admin/access.html#list-of-privileges-and-built-in-roles), so I can't try it, but just for information...
@sanak since our last git conflict (which you solved), I continuously have generated language files that result modified in my workspace:
modified: lib/generated/l10n.dart
modified: lib/generated/l10n_cs.dart
modified: lib/generated/l10n_de.dart
modified: lib/generated/l10n_en.dart
modified: lib/generated/l10n_fr.dart
modified: lib/generated/l10n_it.dart
modified: lib/generated/l10n_ja.dart
modified: lib/generated/l10n_nb.dart
modified: lib/generated/l10n_ru.dart
Since I do not want to create trouble, I need to be sure. These should be removed from git and be placed into git ignore, right?
@moovida Oh, yes. The generated intl files can be removed from git and ignoring those by git ignore is possible.
If deleting output-dir: lib/generated
line from l10n.yaml
, then intl files will be generated in ./.dart_tool/flutter_gen/gen_l10n
, but it is a bit hard to remember, so keeping current output-dir: lib/generated
line will be good.
But about import/export plugins side, it may be good to include generated intl files to simplify smash side build process.
Hosted Weblate alerts following Japanese language conflicts today. https://hosted.weblate.org/projects/smash/smash-main-app/#alerts