Code Monkey home page Code Monkey logo

pootle_fs's Introduction

THIS REPO IS NOW OBSOLETE

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 People

Contributors

phlax avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ta2-1 07djm07

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

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

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 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

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

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:

  1. Specify the languages that we are managing e.g. af, zu
  2. Specify the languages we are not importing at all e.g. -fr, -it
  3. 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.