Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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?
    Mark Steele
    @marksteele
    is there any documentation anywhere on how the TM works?
    Jean Aurambault
    @aurambaj
    no. do you have any specific question?
    Mark Steele
    @marksteele
    I'd like to know how it works :) is it just exact string matches? levenshtein? something else?
    1 reply
    there's also some mention about integration with TMS services, any documentation about that?
    1 reply
    Mark Steele
    @marksteele
    is there a way to check how many untranslated strings there are for in a project? (eg: fail the build if there are untranslated strings)
    1 reply
    Mark Steele
    @marksteele
    is the current latest tag working with mysql? getting: mojito_1 | 2020-11-26 21:05:16.094 INFO 1 --- [ost-startStop-1] o.hibernate.tool.hbm2ddl.TableMetadata : HHH000126: Indexes: [i__users__username, fk__user__user__id, primary] mojito_1 | 2020-11-26 21:05:16.107 ERROR 1 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000388: Unsuccessful: create index I__TM_TEXT_UNIT__NAME on tm_text_unit (name) mojito_1 | 2020-11-26 21:05:16.108 ERROR 1 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : BLOB/TEXT column 'name' used in key specification without a key length mojito_1 | 2020-11-26 21:05:16.110 ERROR 1 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000388: Unsuccessful: create index I__TM_TEXT_UNIT__PLURAL_FORM_OTHER on tm_text_unit (plural_form_other) mojito_1 | 2020-11-26 21:05:16.111 ERROR 1 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : BLOB/TEXT column 'plural_form_other' used in key specification without a key length
    6 replies
    and also ngframework.security.web.access.intercept.FilterSecurityInterceptor@17a88f61] mojito_1 | 2020-11-26 21:05:24.911 INFO 1 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [db/hsql/data.sql] mojito_1 | 2020-11-26 21:05:24.968 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat mojito_1 | 2020-11-26 21:05:24.998 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application startup failed mojito_1 | mojito_1 | org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of class path resource [db/hsql/data.sql]: insert into locale (id, bcp47_tag) values (157, 'af-ZA'); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '157' for key 'PRIMARY'
    3 replies
    Mark Steele
    @marksteele
    trying to get version from master working, getting
    Field emailSender in com.box.l10n.mojito.service.sla.email.SlaCheckerEmailService required a bean of type 'org.springframework.mail.javamail.JavaMailSender' that could not be found.
    2 replies
    Mark Steele
    @marksteele
    on master, still can't get it working. having to dig through the code to find undocumented configs
    currently error I'm seeing is that the html templates aren't interpolating their variables
    1 reply
    <!DOCTYPE html>
    <html>
        <head lang="{{locale}}">
            <title>Mojito</title>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
            <script type="text/javascript">
                APP_CONFIG = {{{appConfig}}};
                CSRF_TOKEN = '{{csrfToken}}';
            </script>
        </head>
    
        <body>
            <div id="app"></div>
            <script type="text/javascript" src="{{contextPath}}/js/app-f55a2fa8bdabd992f6a0.js"></script>
            <script type="text/javascript" src="{{contextPath}}/js/css-f55a2fa8bdabd992f6a0.js"></script>
        </body>
    
    </html>
    Mark Steele
    @marksteele
    spring.flyway.enabled=true
    spring.flyway.clean-disabled=true 
    l10n.flyway.clean=false
    spring.datasource.url=jdbc:mysql://${MOJITO_DB_HOST}:${MOJITO_DB_PORT}/${MOJITO_DB_NAME}?characterEncoding=UTF-8&useUnicode=true&useSSL=false
    spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
    spring.datasource.username=${MOJITO_DB_USERNAME}
    spring.datasource.password=${MOJITO_DB_PASSWORD}
    spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
    server.forward-headers-strategy=native
    l10n.org.quartz.jobStore.useProperties=true
    l10n.org.quartz.scheduler.instanceId=AUTO
    l10n.org.quartz.jobStore.isClustered=true
    l10n.org.quartz.threadPool.threadCount=10
    l10n.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
    l10n.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
    l10n.org.quartz.jobStore.dataSource=myDS
    l10n.org.quartz.dataSource.myDS.provider=hikaricp
    l10n.org.quartz.dataSource.myDS.driver=com.mysql.cj.jdbc.Driver
    l10n.org.quartz.dataSource.myDS.URL=jdbc:mysql://${MOJITO_DB_HOST}:${MOJITO_DB_PORT}/${MOJITO_DB_NAME}?characterEncoding=UTF-8&useUnicode=true
    l10n.org.quartz.dataSource.myDS.user=${MOJITO_DB_USERNAME}
    l10n.org.quartz.dataSource.myDS.password=${MOJITO_DB_PASSWORD}
    l10n.org.quartz.dataSource.myDS.maxConnections=12
    l10n.org.quartz.dataSource.myDS.validationQuery=select 1
    spring.security.oauth2.client.registration.google.client-id="${MOJITO_GOOGLE_CLIENT_ID}"
    spring.security.oauth2.client.registration.google.client-secret="${MOJITO_GOOGLE_CLIENT_SECRET}"
    #l10n.security.authenticationType=DATABASE,OAUTH2,HEADER
    l10n.security.authenticationType=DATABASE,HEADER
    info.build.version=1.0
    spring.profiles.include=disablescheduling
    spring.mail.host=localhost
    spring.jpa.hibernate.use-new-id-generator-mappings=false
    spring.jpa.properties.org.hibernate.envers.audit_strategy=org.hibernate.envers.strategy.ValidityAuditStrategy
    spring.jpa.properties.org.hibernate.envers.track_entities_changed_in_revision=true
    spring.session.store-type=none
    spring.session.jdbc.table-name=SPRING_SESSION_V2
    #l10n.security.unauth-redirect-to=/login/oauth2/authorization/code/google
    that's my config
    Mark Steele
    @marksteele
    I'm trying to dockerize the app. Is there a known good working docker container somewhere based off latest tag I could use instead?
    1 reply
    my dockerfile:
    FROM amazoncorretto:8
    
    RUN mkdir -p /opt/mojito && \
      mkdir -p /usr/local/etc/mojito/webapp
    
    COPY webapp/application.properties /usr/local/etc/mojito/webapp/
    COPY mojito-webapp-0.111-SNAPSHOT-exec.jar /opt/mojito/
    WORKDIR /opt/mojito
    EXPOSE 8080
    
    #CMD ["sleep", "infinity"]
    CMD ["java", "-Dspring.config.location=/usr/local/etc/mojito/webapp/", "-jar", "mojito-webapp-0.111-SNAPSHOT-exec.jar"]
    Mark Steele
    @marksteele
    I've tried using the tagged release, it doesn't work. It's missing mysql driver, db migrations fail due to foreign key constraint failures with mysql
    1 reply
    Jean Aurambault
    @aurambaj
    I'd have to run some more test because ATM moment I work either with master on dev branches. I haven't tried the latest tagged in a while. I have some doc with docker compose here: https://github.com/box/mojito/tree/master/docker (last changes are 9 months old so might be out dated too). https://github.com/box/mojito/blob/master/docker/readme.md
    Mark Steele
    @marksteele
    went back to trying to get 0.110 to work, but now it's failing on not finding quartz tables
    2 replies
    ... tabarnak
    pardon my quebecois ;)
    Jean Aurambault
    @aurambaj
    Since you're technical, I recommend building of master, it has spring boot 2 which as a lot of great stuff for monitoring, etc. I need to look at this doc sync issue and/or do a new release
    Jean Aurambault
    @aurambaj
    where are you planning to deploy it to?
    Mark Steele
    @marksteele
    was planning to run it inside a k8s cluster
    finally got the v0.110 to work, so will probably stick with that for a little bit
    I'd definitely like to get it working on the newer code, just don't have time to dig through the code to find the missing bits/bobs. If you've got a working sample config I don't mind giving it another go
    Jean Aurambault
    @aurambaj
    the configuration on mojito.global: https://www.mojito.global//docs/guides/install/ are the ones that should work well with the master branch
    Mark Steele
    @marksteele
    I essentially used those settings (I pasted the config above), and the html templates don't appear to be interpolating their values
    on master
    Jean Aurambault
    @aurambaj
    I've updated the doc with proper settings for the release binaries on: https://www.mojito.global//docs/. Added extra entries for springboot2/master branch. @marksteele thanks for bearing with the project!
    Mark Steele
    @marksteele
    so I've muddled through with a build off master I think
    spring.flyway.clean-disabled=true 
    l10n.flyway.clean=false
    spring.datasource.url=jdbc:mysql://${MOJITO_DB_HOST}:${MOJITO_DB_PORT}/${MOJITO_DB_NAME}?characterEncoding=UTF-8&useUnicode=true&useSSL=false
    spring.datasource.username=${MOJITO_DB_USERNAME}
    spring.datasource.password=${MOJITO_DB_PASSWORD}
    spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
    l10n.org.quartz.jobStore.useProperties=true
    l10n.org.quartz.scheduler.instanceId=AUTO
    l10n.org.quartz.jobStore.isClustered=true
    l10n.org.quartz.threadPool.threadCount=10
    l10n.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
    l10n.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
    l10n.org.quartz.jobStore.dataSource=myDS
    l10n.org.quartz.dataSource.myDS.provider=hikaricp
    l10n.org.quartz.dataSource.myDS.driver=com.mysql.jdbc.Driver
    l10n.org.quartz.dataSource.myDS.URL=jdbc:mysql://${MOJITO_DB_HOST}:${MOJITO_DB_PORT}/${MOJITO_DB_NAME}?characterEncoding=UTF-8&useUnicode=true&useSSL=false
    l10n.org.quartz.dataSource.myDS.user=${MOJITO_DB_USERNAME}
    l10n.org.quartz.dataSource.myDS.password=${MOJITO_DB_PASSWORD}
    l10n.org.quartz.dataSource.myDS.maxConnections=12
    l10n.org.quartz.dataSource.myDS.validationQuery=select 1
    ## OAUTH2
    l10n.security.authenticationType=DATABASE,OAUTH2,HEADER
    l10n.security.unauth-redirect-to=/login/oauth2/authorization/google
    spring.security.oauth2.client.registration.google.client-id=${MOJITO_GOOGLE_CLIENT_ID}
    spring.security.oauth2.client.registration.google.client-secret=${MOJITO_GOOGLE_CLIENT_SECRET}
    spring.security.oauth2.client.registration.google.authorization-grant-type=authorization_code
    spring.security.oauth2.client.registration.google.scope=profile
    info.build.version=0.111-SNAPSHOT
    spring.mail.host=localhost
    spring.session.store-type=none
    spring.mustache.suffix:.html
    server.tomcat.relaxed-query-chars=[,]
    spring.jpa.open-in-view=false
    management.health.ldap.enabled=false
    management.endpoint.shutdown.enabled=true
    management.metrics.export.statsd.enabled=false
    org.springframework.http.converter.json.indent_output=false
    spring.jpa.hibernate.use-new-id-generator-mappings=false
    is the final config I ended up with
    works with oauth2 and google
    only thing I have yet to figure out is why my cli can talk to the API even though I didn't do any setup for authenticating it
    9 replies
    Mark Steele
    @marksteele
    Made a small edit to allow passing in password from CLI
    @Component
    public class SystemPromptCredentialProvider implements CredentialProvider {
    
        @Value("${user.name}")
        String systemUserName;
    
        @Value("${user.password}")
        String password;
    
        @Override
        public String getUsername() {
            return systemUserName;
        }
    
        @Override
        public String getPassword() {
            if (password == null) {
                System.out.println("Enter password for mojito user " + systemUserName + ": ");
                char[] readPassword = System.console().readPassword();
                password = new String(readPassword);
            }
    
            return password;
        }
    }
    essentially just adding the annotation, allows to do -Duser.name=foo -Duser.password=bar
    when used in conjunction with -Dl10n.resttemplate.authentication.credentialProvider=CONSOLE
    Jean Aurambault
    @aurambaj
    for that use case the normal provider can be used directly. The SystemPrompt was really if you want to read from the console, else it is not really needed. https://www.mojito.global//docs/refs/configurations/#cli-configuration
    so -Dl10n.resttemplate.authentication.username=... -Dl10n.resttemplate.authentication.password=... would work already. No need to change the provider, default one would be fine
    Mukesh Mandora
    @mukyasa
    Hello team, Can some help me with below query

    We were trying hands-on with product and got stuck when we were using the same repo for our Android and iOS projects it is giving error based on the repo was created and imported from the platform

    Eg: if repo is created with iOS strings file and if we pull in Android project then it gives the error

    Asset with path [res/values/strings.xml] was not found in repo [Repo Name]

    Jee Yi
    @jeeyi
    @mukyasa To better understand your setup, what are the options being used to push and pull? When I was working on source code repository with both iOS and Android projects, I set up two different mojito repos to manage them separately.
    Ozan Çağrı Gürleyen
    @Cagrussian_twitter
    Anyone here can give me an already hosted open to public Mojito link so I can check if it's feasible to use with volunteer translators?
    Jean Aurambault
    @aurambaj
    @Cagrussian_twitter we don't have such an instance running at the moment