Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Patrick Connolly
    @patcon
    i can imagine there might be a preference to be explicit with an exception though. depends on what ppl say when i ask. i'd defer
    but if someone wished to register with M49 as the region code (which i understand to be an exception for unique circumstances), i'd be stoked to help with the process :)
    Jean Aurambault
    @aurambaj
    Mojito used to only have locale with region. this is about to change if I push my change
    Patrick Connolly
    @patcon
    oh pls do push change! this shouldn't block
    if its a convo that is going to happen, it can happen after
    Jean Aurambault
    @aurambaj
    i'm not 100% sure why i wanted to always have a region in first place. The more i think about it, the more i feel just language should be available. in many cases it would make simpler to map to platform like android and ios actually
    Patrick Connolly
    @patcon
    i need to talk to ppl first anyhow, i'm making assumptions about the headspace of another culture, based on what i've learned from land acknowledgement research and some books i've read, but assumptions aren't ideal!
    Jean Aurambault
    @aurambaj
    i'll work on it this weekend and i'll keep you posted
    Patrick Connolly
    @patcon
    heh yeah, just a language code would be rad too
    i might use the PR as an excuse to have a discussion with others, but pls don't assume any convo in there means I'll expect it merged. consider it throwaway :)
    thanks @aurambaj -- i should get some sleep now...!
    dusty-82
    @dusty-82
    image.png
    Hi all, I need help with mojito.
    How can I translate the same souce one time?
    For example the word "Yes" is repeated x-time. Can I select all the occurrences and set the releated translation?
    Patrick Connolly
    @patcon
    Hi dusty! I'm new to translation, but is this common practice? Why not manually collapse those into one value in the strings file?
    dusty-82
    @dusty-82
    Hi, I can't do it because every value has an ID. I would lose the key-value association in the json.
    Can I do this "massive insert" using mysql or command line?
    Jean Aurambault
    @aurambaj
    @dusty-82 you can use the leveraging-copy-tm command. Depending on how many strings you have and precision you want you can use match based on text unit ids some like mojito leveraging-copy-tm -m TUIDS --tuids-mapping "1001:2001;1002:2002" or a little bit looser you can provide just source/target repository (and asset) and match by content something like mojito leveraging-copy-tm -m MD5 -s repo -t repo potentially limiting to some text unit names with --name-regex
    dusty-82
    @dusty-82
    Thanks @aurambaj . For example, if I want to translate Yes? I have to write: mojito leveraging-copy-tm -m MD5 -s "Yes?" -t "Si?"
    Can I use quotes?
    Jean Aurambault
    @aurambaj
    ooops made a typo, you need content match so mojito leveraging-copy-tm -m EXACT -s {yourreponame} -t {yourreponame} optional if you want to be sure to copy only those sstring --name-regex "(373566|373567|373616)"
    dusty-82
    @dusty-82
    @aurambaj I don't understand how this command could help me. I need to replicate a translation on different ID (for example 500 times) without using gui.
    Jean Aurambault
    @aurambaj
    yes, it is what this command does
    Jean Aurambault
    @aurambaj
    EXACT means it will look at the english content to match the source string and then copy the translations. The other option is to restrict the source and target strings basically
    if you want to be very precise on what translation you copy: source text unit to target text unit you can provide a mapping of ids with -m TUIDS and providing the exact mapping --tuids-mapping "1001:2001;1002:2002"
    Patrick Connolly
    @patcon
    :heart:
    dusty-82
    @dusty-82
    Goodmorning, I need to merge a new source repo with an existing repo. How can I do it?
    Patrick Connolly
    @patcon
    I think that involved "import" command. Have you tried that yet?
    dusty-82
    @dusty-82
    The ID order of existing strings is changed. Import doesn't work because overwrites rows with the same ID.
    Can I export a repo with ID, source and target values?
    Jean Aurambault
    @aurambaj
    Have you actually tried the import command? it should not be sensitive to the order of the strings. Else you can have a look to tm-export and tm-import commands but I'd probably start with the regular import
    dusty-82
    @dusty-82
    Import works when id and content doesn't change. If ID change the target is empty. I tried to copy the repo to another one, using EXACT parameter, but databases are too big (800.000 entries) and the application crashes.
    Now I try to import the db in small pieces using the push command, the first import was ok, but the second overwrite it. Is there a parameter to concat entries instead of overwrite?
    How many CPUs and RAM do you recommend to manage big repos? Thanks
    Jean Aurambault
    @aurambaj
    Is it 800000 source strings or that number includes translations? For push there is an option --push-type NO_DELETE that can be used but you have to have multiple asset(files) if the file has the same name it will override it. Can you share the error you get when trying to copy?
    FYI I'm currently rewriting the backend to scale better but that will take time
    dusty-82
    @dusty-82
    I have 2 repo with 800.000 source strings.
    If I launch the push command, after about 2 hours, I received this warning:
    [Timer-0] c.m.v.a.ThreadPoolAsynchronousRunner : com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@58aa04f3 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
    Java process uses 200% of CPU. I waited 4 hours but anything change.
    Jean Aurambault
    @aurambaj
    I see, do you mind sharing your use case in PM if you prefer?
    i've never though to test for that much ... but I can have a look with the new implementation :D
    dusty-82
    @dusty-82
    How can i contact you? if you want i can send my json file
    namdh-1522
    @namdh-1522
    /notify-all
    Hi all. I use import to import localized files, but then when I pull the translated file, it showed error
    Localizing: string_ja-JP.properties
    - Processing locale: en-US
    Asset with path [string_ja-JP.properties] was not found in repo [Moneclicks]
    Could you guys help me. Thanks in advance!
    Jean Aurambault
    @aurambaj
    have you run mojito push before? do you use a specific file type?
    Jean Aurambault
    @aurambaj
    @namdh-1522 could you share the exact commands you've run?
    namdh-1522
    @namdh-1522
    @aurambaj Thank you for your support, It was fixed after I remove the unnecessary file out of directory that contains source assets to be localized.
    Freek Van der Wand
    @fr33k4t3k_twitter

    hey guys, I'm new to mojito and I'm currently trying to import my existing translations (structured JSON) named 'de-DE.json' and 'en-GB.json', but I don't get my head around how to import those...

     - Importing file: /home/user/work/tmp/ngxtranslate/src/assets/i18n/en_de-DE.json
    
    No asset for file [/home/user/work/tmp/ngxtranslate/src/assets/i18n/en.json] into repo [CT]

    I'm probably missing just a small flag or something, but I can't figure out:

    Freek Van der Wand
    @fr33k4t3k_twitter
    i18n git:(master) ✗ mojito import -r CT -ft JSON -sl en-GB.json
    Jean Aurambault
    @aurambaj
    @fr33k4t3k_twitter you need to first push your file before import and -sl shouldn't contain .json so something like: mojito push -r CT -ft JSON -sl en-GB
    then mojito import -r CT -ft JSON -sl en-GB
    Jean Aurambault
    @aurambaj
    also with -ft JSON the format of the is for the sourcee file{basename}.json and for the localized files are {basename}_{locale}.json so example.json and example_de-DE.json
    if you want no basename in the file name you'd have to use -ft JSON_NOBASENAME
    Freek Van der Wand
    @fr33k4t3k_twitter
    @aurambaj thanks, that helped ;)
    dusty-82
    @dusty-82
    Hi. How to make hsqldb file persistent?
    dusty-82
    @dusty-82
    Have you ever tried to add more than 100.000 rows? Using mysql, it needs 2 hours.
    hsqldb version is 2.1.0.0, which was released in 2011. Is there a mojito version with an actual (2.5) library?