Menu

#1189 New team mode implementation

4.0
closed-fixed
None
5
2016-11-01
2016-03-12
No

New team mode implementation. Instead of previous implementation, where project was in place of working copy, new implementation creates separate folder for git/svn working copy and working files, then copy files from/to project folders. Benefits of new implementation:

  • more stable work with git/svn
  • ability to work with more than one repository. For example, user can use source files from one git repository, but store translations(and share it) in other svn repository. It allows to use source files just from main software repository without commit permissions, but share results only with translation team. Or even don't share results but store they locally.
  • ability to get some files(like source files, dictionaries, etc.) from other storages(not only svn/git), but non-repository external storage like just http url

Instead of just store project in svn/git, idea is mapping is used. User can "map" any project folder(or project folder itself) into any repository.

Related

Bugs: #776
Bugs: #777
Bugs: #793
Bugs: #821
Bugs: #824

Discussion

  • Didier Briel

    Didier Briel - 2016-03-12

    Instead of relying on Subversion/Git storage, credentials are stored within OmegaT. The list of stored credentials can be accessed with Options > Repository Credentials and they can be deleted selectively.

    Didier

     
  • Didier Briel

    Didier Briel - 2016-03-12

    The repository mapping is done in Project Properties > Repository mapping.

    Didier

     
  • Aaron Madlon-Kay

    I find the notation for inclusions in the Repository Mapping dialog to be confusing. For instance if my repository provides dictionaries under /fooDict (relative to repository root) then I would expect to map /fooDict to /dictionary (relative to project root). However there is an explicit check that disallows mappings where both sides start with /. Why is that?

     
  • Aaron Madlon-Kay

    Also it appears to be required that mappings of directories end with a /. Is that necessary?

    For my example above it turns out it will work with

    • Local: dictionary/
    • Remote: fooDict/

    But my first stab at this was the following, which seems reasonable to me:

    • Local: /dictionary
    • Remote: /fooDict
     

    Last edit: Aaron Madlon-Kay 2016-05-18
  • Didier Briel

    Didier Briel - 2016-07-06

    I confirm that currently the mapping of directories must ends with a /.
    The Inclusions and Exclusions must follow the same pattern as other inclusions and exclusions in project properties.

    The following shows the mapping of some OmegaT translatable documents into a team project:

     <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/src/org/omegat">
         <mapping local="source/" repository="">
             <excludes>**/*</excludes>
             <includes>**/Bundle.properties</includes>
         </mapping>
    </repository>
    <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/doc_src/en">
        <mapping local="source/doc_src/" repository=""/>
    </repository>
    

    Didier

     

    Last edit: Didier Briel 2016-07-07
  • Didier Briel

    Didier Briel - 2016-07-07

    It is also possible to map files instead of directories (hence the need for a trailing / to differentiate them).

    The following will take readme.txt from OmegaT and rename it readme_fr.txt into a team project:

    <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/release">
        <mapping local="source/readme_fr.txt" repository="readme.txt"/>
    </repository>
    

    Didier

     

    Last edit: Didier Briel 2016-07-07
  • Didier Briel

    Didier Briel - 2016-07-18

    Below, there is the complet mapping of an EN to FR OmegaT localisation project:

    <repositories>
            <repository type="svn" url="https://[myteamproject]/test-omegat">
                    <mapping local="" repository=""/>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/src/org/omegat">
                    <mapping local="source/" repository="">
                            <excludes>**/*</excludes>
                            <includes>**/Bundle.properties</includes>
                    </mapping>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/doc_src/en">
                    <mapping local="source/doc_src/" repository=""/>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/release">
                    <mapping local="source/readme_fr.txt" repository="readme.txt"/>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/release/mac-specific/OmegaT.app/Contents/Resources/en.lproj">
                    <mapping local="source/release/mac-specific/" repository=""/>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/release/win32-specific">
                    <mapping local="source/release/win32-specific/CustomMessages.ini" repository="CustomMessages.ini"/>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/scripts/properties">
                    <mapping local="source/scripts/" repository="">
                            <excludes>**/*</excludes>
                            <includes>**/check_rules.properties</includes>
                            <includes>**/spellcheck.properties</includes>
                            <includes>**/svn_cleanup_selected.properties</includes>
                            <includes>**/search_replace.properties</includes>
                            <includes>**/replace_strip_tags.properties</includes>
                            <includes>**/strip_bidi_marks.properties</includes>
                            <includes>**/nbsp.properties</includes>
                    </mapping>
            </repository>
    </repositories>
    

    The actual team project is on [myteamproject], all the rest is from /trunk.

    Didier

     
  • Didier Briel

    Didier Briel - 2016-07-19

    The issue with the above is that it's not possible with git (you have to check out the whole tree), and that /release is checked out three times, once in full (for readme.txt) and the other two times partially.

    For the second issue, one can of course use includes inside /release to only get it once.

    However, if it is not possible to check out partial directories, the standard solution is to use includes to select the files to download. Below is a simpler mapping that checks out the whole /trunk to get OmegaT localisation files.

    <repositories>
            <repository type="svn" url="https:// [myteamproject]/test-omegat">
                    <mapping local="" repository=""/>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk">
                    <mapping local="source/" repository="">
                            <excludes>**/*</excludes>
                            <includes>**/Bundle.properties</includes>
                            <includes>**/doc_src/en/**</includes>
                            <includes>**/release/readme.txt</includes>
                            <includes>**/release/mac-specific/OmegaT.app/Contents/Resources/en.lproj/**</includes>
                            <includes>**/CustomMessages.ini</includes>
                            <includes>**/check_rules.properties</includes>
                            <includes>**/spellcheck.properties</includes>
                            <includes>**/svn_cleanup_selected.properties</includes>
                            <includes>**/search_replace.properties</includes>
                            <includes>**/replace_strip_tags.properties</includes>
                            <includes>**/strip_bidi_marks.properties</includes>
                            <includes>**/nbsp.properties</includes>
                    </mapping>
            </repository>
    </repositories>
    

    Didier

     

    Last edit: Didier Briel 2016-07-19
  • Didier Briel

    Didier Briel - 2016-07-26

    In addition to svn and git, it is also possible to get files by HTTP(S). However, you can only get files, not directories, so you have to know in advance the file names. The following mapping uses HTTPS for all files except for the documentation, where svn is used. Note that the Mac localisation file is mapped separately, because otherwise the operating system (Windows 7) gives an error because the local path is too long.

    <repositories>
            <repository type="svn" url="https://[myteamproject]/test-omegat">
                    <mapping local="" repository=""/>
            </repository>
            <repository type="svn" url="https://svn.code.sf.net/p/omegat/svn/trunk/doc_src/en">
                    <mapping local="source/doc_src/" repository=""/>
            </repository>
            <repository type="http" url="https://svn.code.sf.net/p/omegat/svn/trunk/">
                    <mapping local="source/Bundle.properties" repository="src/org/omegat/Bundle.properties"/>
                    <mapping local="source/readme_fr.txt" repository="release/readme.txt"/>
                    <mapping local="source/release/win32-specific/CustomMessages.ini" repository="release/win32-specific/CustomMessages.ini"/>
                    <mapping local="source/scripts/check_rules.properties" repository="scripts/properties/check_rules.properties"/>
                    <mapping local="source/scripts/spellcheck.properties" repository="scripts/properties/spellcheck.properties"/>
                    <mapping local="source/scripts/svn_cleanup_selected.properties" repository="scripts/properties/svn_cleanup_selected.properties"/>
                    <mapping local="source/scripts/search_replace.properties" repository="scripts/properties/search_replace.properties"/>
                    <mapping local="source/scripts/replace_strip_tags.properties" repository="scripts/properties/replace_strip_tags.properties"/>
                    <mapping local="source/scripts/strip_bidi_marks.properties" repository="scripts/properties/strip_bidi_marks.properties"/>
                    <mapping local="source/scripts/nbsp.properties" repository="scripts/properties/nbsp.properties"/>
            </repository>
            <repository type="http" url="https://svn.code.sf.net/p/omegat/svn/trunk/release/mac-specific/OmegaT.app/Contents/Resources/en.lproj/">
                    <mapping local="source/release/mac-specific/Localizable.strings" repository="Localizable.strings"/>
            </repository>
    </repositories>
    

    Didier

     

    Last edit: Didier Briel 2016-07-26
  • Aaron Madlon-Kay

    Regarding my comments above: After discussion on omegat-dev-tech the following changes have been made.

    • It is no longer disallowed to start mapping rules with /, which indicates the root of the repository as pointed to by the URL
    • There are no longer any requirements pertaining to trailing slashes (they are optional in all cases)
     

    Last edit: Aaron Madlon-Kay 2016-07-28
  • Didier Briel

    Didier Briel - 2016-09-06
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2016-09-06

    Implemented in the released version 4.0 of OmegaT.

    Didier

     
  • Didier Briel

    Didier Briel - 2016-11-01

    Note that if /target is mapped to a repository (which is the case if it is simply versioned as in 3.x), then it will be synchronised from local to repository.

    Actually, this was never implemented and the /target folder was synchronised systematically.

    With [#1341], Project > Commit Target Files allows to synchronise from local to repository.

    Didier

     

    Related

    Feature Requests: #1341


    Last edit: Didier Briel 2017-10-18

Log in to post a comment.

MongoDB Logo MongoDB