pootle_fs has been merged into Pootle. We would recommend using version 2.9 or above to make best use of it
pootle_fs's Introduction
pootle_fs's People
pootle_fs's Issues
Unstaging staged files
If you do add/fetch and stage something it would be good to have a way to unstage them if you made a mistake
Ensure sync is in clean state if push fails
Add docs
Keep the old version of store/file
Atm if either side is ahead on a previously synced file its automatically staged for push/pull.
This is fine - except where you want to keep the old file/store - at which point you have to go and sort out the problem in Pootle/FS.
It would be good to have a way to keep the old version - perhaps when using add/fetch --force
Add local FS plugin
Save config in the db
Allow localization of pootle_fs
At least allow the localisation of the output from the status command.
Deal with unknown languages better
Make Pootle accrediation configurable
Error on pull_translation
I do the following:
fetch_translation
- that fails because of missing .pootle.ini
. Add the missing INI files and then that works. Then running pull_translations
cause this traceback. I hope I've got that order correct.
(pootle)dwayne@heather-desktop:~/dev/pootle$ ./manage.py fs poedit pull_translations
2015-10-12 21:12:07,490 INFO Using Python PO
2015-10-12 21:12:07,608 INFO Pulling git repository(poedit): https://github.com/dwaynebailey/poedit.git
2015-10-12 21:12:14,100 WARNING Language does not exist for ProjectFS object: pt_PT
2015-10-12 21:12:14,103 WARNING Language does not exist for ProjectFS object: kab
2015-10-12 21:12:14,116 WARNING Language does not exist for ProjectFS object: co
2015-10-12 21:12:14,129 WARNING Language does not exist for ProjectFS object: ckb
2015-10-12 21:12:14,149 WARNING Language does not exist for ProjectFS object: fy_NL
Traceback (most recent call last):
File "./manage.py", line 22, in <module>
execute_from_command_line()
File "/home/dwayne/.virtualenvs/pootle/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_comma$
d_line
utility.execute()
File "/home/dwayne/.virtualenvs/pootle/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/dwayne/.virtualenvs/pootle/src/pootle-fs/pootle_fs/management/commands/fs.py", line 97, in run_from_argv
argv[:1] + [subcommand, project_code] + argv[4:])
File "/home/dwayne/.virtualenvs/pootle/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/dwayne/.virtualenvs/pootle/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/home/dwayne/.virtualenvs/pootle/src/pootle-fs/pootle_fs/management/commands/fs_commands/pull_translations.py", line 31, in handle
pootle_path=options['pootle_path']))
File "/home/dwayne/.virtualenvs/pootle/src/pootle-fs/pootle_fs/models.py", line 109, in pull_translations
prune=prune, fs_path=fs_path, pootle_path=pootle_path)
File "/home/dwayne/.virtualenvs/pootle/src/pootle-fs/pootle_fs/plugin.py", line 257, in pull_translations
fs_status.store_fs.file.pull()
File "/home/dwayne/.virtualenvs/pootle/src/pootle-fs/pootle_fs/files.py", line 232, in pull
self.sync_to_pootle()
File "/home/dwayne/.virtualenvs/pootle/src/pootle-fs/pootle_fs/files.py", line 207, in sync_to_pootle
submission_type=SubmissionTypes.UPLOAD)
File "/home/dwayne/dev/pootle/pootle/apps/pootle_store/models.py", line 1867, in update
disk_mtime = self.get_file_mtime()
File "/home/dwayne/dev/pootle/pootle/apps/pootle_store/models.py", line 1596, in get_file_mtime
.fromtimestamp(self.file.getpomtime()[0])
File "/home/dwayne/dev/pootle/pootle/apps/pootle_store/fields.py", line 125, in getpomtime
file_stat = os.stat(self.realpath)
File "/home/dwayne/dev/pootle/pootle/apps/pootle_store/fields.py", line 142, in realpath
return self._get_realpath()
File "/home/dwayne/dev/pootle/pootle/apps/pootle_store/fields.py", line 135, in _get_realpath
self._realpath = os.path.realpath(self.path)
File "/home/dwayne/.virtualenvs/pootle/local/lib/python2.7/site-packages/django/db/models/fields/files.py", line 61, in _get_path
self._require_file()
File "/home/dwayne/.virtualenvs/pootle/local/lib/python2.7/site-packages/django/db/models/fields/files.py", line 44, in _require_file
raise ValueError("The '%s' attribute has no file associated with it." % self.field.name)
ValueError: The 'file' attribute has no file associated with it.
Using no_mtime Branch is required
Why is it necessary to use the the "no_mtime" Branch?
Actually we want to use pootle_fs but we have installed the last stable TAG 2.7.6
Whats the diffrent!
Add proper handling of templates
Add better failure tests
Basically thinking there are 3 levels we need to test failure
- how the response object handles/reports failure(s)
- how the plugin handles failure - see #21
- how commands output failure
Add auto_sync method to plugin
Im figuring this is what the scheduler could call.
The default behaviour would be:
- add_translations
- fetch_translations
- merge_translations
- rm_translations
- sync_translations
Im figuring all but the last step should be configurable - perhaps a syntax like
[auto]
tasks = add
fetch
merge
rm
or
[auto]
tasks = fetch_force
merge
rm
etc
Add language filtering for command line tools
Stage removal of files
atm to remove files that are missing on either side you use push/pull --prune.
this has shortcomings for several reasons.
im thinking that either:
add the --prune command to add/fetch to stage removal:
- easiest option
- its a bit counter-intuitive to do "add_translations --prune" to remove something
add an rm_translations
command to stage removal
Add mercurial support
Configure commit message/attribution
Order status output correctly
Investigate possibility of merging conflicts
Test out non-PO issues
Allow configuring languages to sync or to ignore
Currently we are importing the whole of the upstream repo. We're assuming that all languages of interest can and should be edited on Pootle.
This would not be true on some of our installations. In those cases we want to be able to:
- Specify the languages that we are managing e.g. af, zu
- Specify the languages we are not importing at all e.g. -fr, -it
- Allow the specification of special use cases. Those that we import but only as an alt-src language. Thus we import them but don't show them in Pootle.
Create a pootle_fs docker demo
Basically
- fork a github repo (https://github.com/copitux/python-github3)
- add a .pootle.ini - this may need to be passed to docker image
- setup a pootle project and assoc
- fetch_translations into pootle
Add --unmatched flag to status
Add language code mapping
Dont delete obsolete
atm it deletes Stores during a pull_translations --prune
Make sync_translations atomic
Ideally if push to the FS fails the db updates should roll back
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.