New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A translation for Brazilian Portuguese #79

Open
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@augusto-herrmann
Copy link

augusto-herrmann commented Aug 10, 2017

I hope I have changed all the necessary files for it to work.

I have tried but failed to get the project running locally for testing.

@gvilarino

This comment has been minimized.

Copy link

gvilarino commented Aug 10, 2017

Care to take a look @jfresco ?

@augusto-herrmann

This comment has been minimized.

Copy link

augusto-herrmann commented Aug 14, 2017

I would test it myself, but when trying to run the app I get the following error:

$ sudo docker-compose up
WARNING: The PWD variable is not set. Defaulting to a blank string.
Building app
Step 1 : FROM node:argon
 ---> efc811692903
Step 2 : MAINTAINER Matías Lescano <matias@democraciaenred.org>
 ---> Using cache
 ---> 81399ea61264
Step 3 : RUN apt-get update &&   apt-get install -y libkrb5-dev &&   npm config set python python2.7
 ---> Using cache
 ---> fe83bac3ed13
Step 4 : COPY package.json /usr/src/
 ---> Using cache
 ---> 0cd251d4dd49
Step 5 : WORKDIR /usr/src
 ---> Using cache
 ---> 7f82b9438e34
Step 6 : RUN npm install --quiet --unsafe-perm
 ---> Running in 05894bc069eb
npm WARN package.json civic-stack@1.1.0 No README data

(other WARNINGS edited for brevity)

npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror git://github.com/timaschew/cogent.git /root/.npm/_git-remotes/git-github-com-timaschew-cogent-git-7d2efc1e: Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-timaschew-cogent-git-7d2efc1e'...
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror git://github.com/timaschew/cogent.git /root/.npm/_git-remotes/git-github-com-timaschew-cogent-git-7d2efc1e: fatal: unable to connect to github.com:
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror git://github.com/timaschew/cogent.git /root/.npm/_git-remotes/git-github-com-timaschew-cogent-git-7d2efc1e: github.com[0: 192.30.253.112]: errno=Connection timed out
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror git://github.com/timaschew/cogent.git /root/.npm/_git-remotes/git-github-com-timaschew-cogent-git-7d2efc1e: github.com[1: 192.30.253.113]: errno=Connection timed out
npm ERR! Linux 4.10.0-30-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--quiet" "--unsafe-perm"
npm ERR! node v4.8.4
npm ERR! npm  v2.15.11
npm ERR! code 128

npm ERR! Command failed: git clone --template=/root/.npm/_git-remotes/_templates --mirror git://github.com/timaschew/cogent.git /root/.npm/_git-remotes/git-github-com-timaschew-cogent-git-7d2efc1e
npm ERR! Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-timaschew-cogent-git-7d2efc1e'...
npm ERR! fatal: unable to connect to github.com:
npm ERR! github.com[0: 192.30.253.112]: errno=Connection timed out
npm ERR! github.com[1: 192.30.253.113]: errno=Connection timed out
npm ERR! 
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/src/npm-debug.log
ERROR: Service 'app' failed to build: The command '/bin/sh -c npm install --quiet --unsafe-perm' returned a non-zero code: 1

Apparently the container can't find Github.com for some reason.

The problem also happens with the base unaltered code, cloned from the repository. I'm a noob in Docker, so it may be my own fault I can't run the app.

@gvilarino

This comment has been minimized.

Copy link

gvilarino commented Aug 14, 2017

@augusto-herrmann it seems you're working on Windows. Windows development is not supported, although mainly I see two things you should look at:

  1. either set a PWD env var to the process or overwrite the docker-compose.yml in that part so it works properly with your path
  2. git clones are failing, maybe you're in a network that blocks SSH traffic. Attempt those clones manually in your dev box to see what happens.
@augusto-herrmann

This comment has been minimized.

Copy link

augusto-herrmann commented Aug 14, 2017

Thanks for the tips, @gvilarino.

I actually am working on Ubuntu 16.04, not Windows. Setting and env var did get rid of the first warning and timeouts, but then it just hangs after the warnings about Kerberos, even if I run docker-compose with the -d flag.

$ sudo PWD=~/civicstack docker-compose up -d
Building app
Step 1 : FROM node:argon
 ---> efc811692903
Step 2 : MAINTAINER Matías Lescano <matias@democraciaenred.org>
 ---> Using cache
 ---> 81399ea61264
Step 3 : RUN apt-get update &&   apt-get install -y libkrb5-dev &&   npm config set python python2.7
 ---> Using cache
 ---> fe83bac3ed13
Step 4 : COPY package.json /usr/src/
 ---> Using cache
 ---> 0cd251d4dd49
Step 5 : WORKDIR /usr/src
 ---> Using cache
 ---> 7f82b9438e34
Step 6 : RUN npm install --quiet --unsafe-perm
 ---> Running in 218ec1fb046a
npm WARN package.json civic-stack@1.1.0 No README data
npm WARN deprecated jade@1.7.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated crypto@0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN engine open-graph-scraper@2.5.4: wanted: {"node":">=6.0"} (current: {"node":"4.8.4","npm":"2.15.11"})
npm WARN deprecated mongodb@2.0.55: Please upgrade to 2.2.19 or higher
npm WARN deprecated graceful-fs@2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated native-or-bluebird@1.2.0: 'native-or-bluebird' is deprecated. Please use 'any-promise' instead.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated mongodb@1.4.31: Please upgrade to 2.2.19 or higher
npm WARN peerDependencies The peer dependency kerberos@~0.0 included from mongodb-core will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

> kerberos@0.0.9 install /usr/src/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/usr/src/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build'
  CXX(target) Release/obj.target/kerberos/lib/kerberos.o
kerberos.target.mk:100: recipe for target 'Release/obj.target/kerberos/lib/kerberos.o' failed
make: Leaving directory '/usr/src/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build'

> bson@0.2.22 install /usr/src/node_modules/mongoose/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/usr/src/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build'
  CXX(target) Release/obj.target/bson/ext/bson.o
bson.target.mk:94: recipe for target 'Release/obj.target/bson/ext/bson.o' failed
make: Leaving directory '/usr/src/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build'

> kerberos@0.0.23 install /usr/src/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)

make: Entering directory '/usr/src/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos/build'
  CXX(target) Release/obj.target/kerberos/lib/kerberos.o
  CXX(target) Release/obj.target/kerberos/lib/worker.o
  CC(target) Release/obj.target/kerberos/lib/kerberosgss.o
../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
 #pragma clang diagnostic push
 ^
../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
 ^
../lib/kerberosgss.c: In function 'authenticate_gss_client_wrap':
../lib/kerberosgss.c:446:19: warning: variable 'server_conf_flags' set but not used [-Wunused-but-set-variable]
   char buf[4096], server_conf_flags;
                   ^
../lib/kerberosgss.c: At top level:
../lib/kerberosgss.c:1236:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
 #pragma clang diagnostic pop
 ^
  CC(target) Release/obj.target/kerberos/lib/base64.o
  CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
  SOLINK_MODULE(target) Release/obj.target/kerberos.node
  COPY Release/kerberos.node
make: Leaving directory '/usr/src/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos/build'

While it is running, I get no response when I access localhost:3000 or 127.0.0.1:3000.

BTW, you have done a nice introduction to docker with your docker-workshop. I've just followed it.

@augusto-herrmann

This comment has been minimized.

Copy link

augusto-herrmann commented Aug 14, 2017

Actually, after a while waiting for docker-compose to build, I've got those git clone timeouts again. Oddly, outside of Docker git clone and other SSH operations do work normally.

@augusto-herrmann

This comment has been minimized.

Copy link

augusto-herrmann commented Sep 11, 2017

I think I give up trying to run the app for testing. Regardless, it should be simple enough for you guys to run it and see if it works. I do not expect there to be any problems with it.

@augusto-herrmann

This comment has been minimized.

Copy link

augusto-herrmann commented Oct 5, 2017

@gvilarino, it turns out that there is no problem with SSH traffic in my network at all.

There are three protocols git can use, git, ssh and https. Unfortunately, my network blocks only git, but ssh and https do work. I tried changing package.json to use https instead of git, but in result I get the same error.

It turns out one of the dependencies (I do not know which one) depends on the /timaschew/cogent package, but declares this dependency using the git protocol. I don't see any obvious way to override that and make it use ssh or https instead.

Any ideas?

@gvilarino

This comment has been minimized.

Copy link

gvilarino commented Oct 5, 2017

@augusto-herrmann sadly, there's no way for us to override that since it's an issue of the package itself. The official way to support more than one protocol for a git dependency is described in the official npm documentation. I guess you could open a PR in their repo with that upgrade, linking to this issue.

Also, thanks for following the docker workshop and your kind words <3

@jfresco

This comment has been minimized.

Copy link
Collaborator

jfresco commented Oct 5, 2017

Hi @augusto-herrmann! Amazing job with the translations, thank you very much 👏

It seems that you're missing some UI wirings in order to make the app to switch to Portuguese. For example, there is a menu in the sidebar in which you can choose the language, and Portuguese is missing there:

image

Do you think you can set up your environment to complete that task? Please let us know.

@augusto-herrmann

This comment has been minimized.

Copy link

augusto-herrmann commented Oct 6, 2017

@gvilarino, the package which is originating the problem is not a direct dependency defined in packages.json. It is further down in the dependency tree. The error message I already pasted above does not include enough information to find out. Do you know how to debug the dependency tree to find out which packages are requiring timaschew/cogent?

Thanks, @jfresco! I have now noticed other places where I needed to add the language as well. I hope that's all of them, as I still couldn't solve the problem preventing me to run the app and see myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment