Skip to content

Commit

Permalink
Merge pull request #166 from transifex/app-transifex-com
Browse files Browse the repository at this point in the history
app.transifex.com: Update TXC host
  • Loading branch information
kostasgeo committed Apr 3, 2023
2 parents 5da3ed3 + a42522c commit 4e20586
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 42 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ and the config file with the following content which is required for the configu

```shell
[main]
host=https://www.transifex.com
host=https://app.transifex.com
```

In case there is already a `.tx/config` file in the current directory, the users
Expand Down Expand Up @@ -249,7 +249,7 @@ Your `.tx/config` file should look like this:

```ini
[main]
host = https://www.transifex.com
host = https://app.transifex.com

[o:organization-1:p:project-1:r:en_php]
source_file = locale/en.php
Expand Down Expand Up @@ -352,7 +352,7 @@ that, you can run the following command with Linux or Mac OS:
```sh
tx add remote \
--file-filter 'translations/<project_slug>.<resource_slug>/<lang>.<ext>'
https://www.transifex.com/myorganization/myproject/dashboard/
https://app.transifex.com/myorganization/myproject/dashboard/
```

> The use of tx add remote appends the content in the .tx/config file and does not overwrite it. However, if the project and resource exist in the .tx/config file, then it will overwrite the previous information for the specific project & resource.
Expand All @@ -364,7 +364,7 @@ remote project. ie the configuration file may look like this:

```ini
[main]
host = https://www.transifex.com
host = https://app.transifex.com

[o:myorganization:p:myproject:r:resource1]
file_filter = translations/myproject.resource1/<lang>.po
Expand Down Expand Up @@ -437,7 +437,7 @@ You can limit the resources you want to push with:
A resource ID must refer to a resource that has already been configured with
`tx add` and has the form `<project>.<resource>`. So, if the URL of your
resource in Transifex is
`https://www.transifex.com/myorganization/myproject/myresource`, then the
`https://app.transifex.com/myorganization/myproject/myresource`, then the
resource ID will be `myproject.myresource`.

You can also use the `*` character to select multiple resources with the same
Expand Down Expand Up @@ -544,9 +544,9 @@ fall back to taking the filesystem timestamp into account.

- `--branch`: Using this flag, you can access copies of the regular remote
resource that are tied to the provided branch. So if `tx push proj.res`
pushes to the `https://www.transifex.com/org/proj/res` resource, then `tx
pushes to the `https://app.transifex.com/org/proj/res` resource, then `tx
push --branch foo proj.res` will push to the
`https://www.transifex.com/org/proj/foo--res` resource. This way you can
`https://app.transifex.com/org/proj/foo--res` resource. This way you can
separate the localization effort across different branches. If you supply an
empty string as the branch (`--branch ''`), then the client will attempt to
figure out the currently active branch in the local git repository. For
Expand All @@ -562,10 +562,10 @@ fall back to taking the filesystem timestamp into account.
```

This way, the "regular"
`https://www.transifex.com/myorganization/myproject/myresource` resource will
`https://app.transifex.com/myorganization/myproject/myresource` resource will
not be affected by the changes you did to the source strings and the
localization effort can be done in parallel on the
`https://www.transifex.com/myorganization/myproject/new_feature--myresource`
`https://app.transifex.com/myorganization/myproject/new_feature--myresource`
resource.

> Note: Starting from version 1.5.0 resources created using the `--branch` flag,
Expand Down Expand Up @@ -752,9 +752,9 @@ following: `'default', 'reviewed'`, `'proofread'`, `'translator'`, `'untranslate

- `--branch`: Using this flag, you can access copies of the regular remote
resource that are tied to the provided branch. So if `tx pull proj.res`
pulls from the `https://www.transifex.com/org/proj/res` resource, then `tx
pulls from the `https://app.transifex.com/org/proj/res` resource, then `tx
pull --branch foo proj.res` will pull from the
`https://www.transifex.com/org/proj/foo--res` resource. This way you can
`https://app.transifex.com/org/proj/foo--res` resource. This way you can
separate the localization effort across different branches. If you supply an
empty string as the branch (`--branch ''`), then the client will attempt to
figure out the currently active branch in the local git repository. For
Expand All @@ -769,10 +769,10 @@ following: `'default', 'reviewed'`, `'proofread'`, `'translator'`, `'untranslate
```

This way, the "regular"
`https://www.transifex.com/myorganization/myproject/myresource` resource will
`https://app.transifex.com/myorganization/myproject/myresource` resource will
not be affected by the changes one did, and the localization effort can be done
in parallel on the
`https://www.transifex.com/myorganization/myproject/new_feature--myresource`
`https://app.transifex.com/myorganization/myproject/new_feature--myresource`
resource.

- `--skip`: Normally, if a download fails, the client will abort. This may not
Expand Down
2 changes: 1 addition & 1 deletion cmd/tx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ func Main() {
Subcommands: []*cli.Command{
{
Name: "remote",
Usage: "tx add remote https://www.transifex.com/myorganization/myproject/dashboard/",
Usage: "tx add remote https://app.transifex.com/myorganization/myproject/dashboard/",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "file-filter",
Expand Down
4 changes: 2 additions & 2 deletions examples/exampleconf/.transifexrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

# Host section (can have multiple).
# Host is chosen by the `.tx/config` host variable
[https://www.transifex.com]
[https://app.transifex.com]

# Legacy config. API v2.5 host
api_hostname = https://api.transifex.com

# Legacy config. API v2 host
hostname = https://www.transifex.com
hostname = https://app.transifex.com

# Legacy config. Username. If the username is `api` the password is an API token
username = __username_or_api__
Expand Down
2 changes: 1 addition & 1 deletion examples/exampleconf/.tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
# Points to `$HOME/.transifexrc` (RootConfig) host configuration
# If a `.transifexrc` is found in the .tx directory it takes precedence
host = https://www.transifex.com
host = https://app.transifex.com

# Example global language mapping (tranisfex language -> local languages)
lang_map = de: de-Br, pt_BR: foo
Expand Down
2 changes: 1 addition & 1 deletion internal/txlib/add_remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestAddRemote(t *testing.T) {
err := AddRemoteCommand(
cfg,
&api,
"https://www.transifex.com/orgslug/projslug/whatever/whatever/",
"https://app.transifex.com/orgslug/projslug/whatever/whatever/",
// Lets make the file filter a bit weird
"locale/<project_slug><project_slug>.<resource_slug>/<lang>.<ext>",
50,
Expand Down
2 changes: 1 addition & 1 deletion internal/txlib/config/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestLoadLocalConfig(t *testing.T) {
}

expected := LocalConfig{
Host: "https://www.transifex.com",
Host: "https://app.transifex.com",
Path: path,
LanguageMappings: map[string]string{
"de": "de-Br",
Expand Down
4 changes: 2 additions & 2 deletions internal/txlib/config/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ func TestLoadExampleRootConfig(t *testing.T) {
expected := RootConfig{
Path: path,
Hosts: []Host{{
Name: "https://www.transifex.com",
Name: "https://app.transifex.com",
ApiHostname: "https://api.transifex.com",
Hostname: "https://www.transifex.com",
Hostname: "https://app.transifex.com",
Username: "__username_or_api__",
Password: "__password_or_api_token__",
RestHostname: "https://rest.api.transifex.com",
Expand Down
4 changes: 2 additions & 2 deletions internal/txlib/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func GetHostAndToken(
restHostname = activeHost.RestHostname
} else {
// Fall back to defaults
hostname = "https://www.transifex.com"
hostname = "https://app.transifex.com"
restHostname = "https://rest.api.transifex.com"
}
}
Expand All @@ -110,7 +110,7 @@ func GetHostAndToken(
fmt.Println("API token not found. Please provide it and it will " +
"be saved in '~/.transifexrc'.")
fmt.Println("If you don't have an API token, you can generate " +
"one in https://www.transifex.com/user/settings/api/")
"one in https://app.transifex.com/user/settings/api/")
fmt.Print("> ")
_, err := fmt.Scanln(&token)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/txlib/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func InitCommand() error {

cfg := config.LocalConfig{
Path: configName,
Host: "https://www.transifex.com",
Host: "https://app.transifex.com",
}

err = cfg.Save()
Expand Down
2 changes: 1 addition & 1 deletion internal/txlib/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestInitCreateFileContents(t *testing.T) {

res := cfg.Local.Host

assert.Equal(t, res, "https://www.transifex.com")
assert.Equal(t, res, "https://app.transifex.com")
}

func TestDoesNotChangeConfigWhenAbort(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/txlib/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func MigrateLegacyConfigFile(
}

fmt.Println("If you don't have an API token, you can generate " +
"one in https://www.transifex.com/user/settings/api/")
"one in https://app.transifex.com/user/settings/api/")
fmt.Print("> ")
var token string
_, err := fmt.Scanln(&token)
Expand Down
32 changes: 16 additions & 16 deletions internal/txlib/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ func TestSuccessfulMigration(t *testing.T) {
defer f.Close()

_, err2 := f.WriteString(`
[https://www.transifex.com]
[https://app.transifex.com]
api_hostname = https://api.transifex.com
hostname = https://www.transifex.com
hostname = https://app.transifex.com
username = api
password = apassword
`)
Expand All @@ -175,7 +175,7 @@ func TestSuccessfulMigration(t *testing.T) {

_, err2 = f.WriteString(`
[main]
host = https://www.transifex.com
host = https://app.transifex.com
[projslug.ares]
file_filter = locale/<lang>.po
minimum_perc = 0
Expand Down Expand Up @@ -283,9 +283,9 @@ func TestSuccessfulMigrationWithSourceFileConstruction(t *testing.T) {
defer f.Close()

_, err2 := f.WriteString(`
[https://www.transifex.com]
[https://app.transifex.com]
api_hostname = https://api.transifex.com
hostname = https://www.transifex.com
hostname = https://app.transifex.com
username = api
password = apassword
`)
Expand All @@ -304,7 +304,7 @@ func TestSuccessfulMigrationWithSourceFileConstruction(t *testing.T) {

_, err2 = f.WriteString(`
[main]
host = https://www.transifex.com
host = https://app.transifex.com
[projslug.ares]
file_filter = locale/<lang>.po
minimum_perc = 0
Expand Down Expand Up @@ -385,9 +385,9 @@ func TestNeedsTokenInRootConfig(t *testing.T) {
defer f.Close()

_, err2 := f.WriteString(`
[https://www.transifex.com]
[https://app.transifex.com]
api_hostname = https://api.transifex.com
hostname = https://www.transifex.com
hostname = https://app.transifex.com
username = tk
password = apassword
`)
Expand All @@ -406,7 +406,7 @@ func TestNeedsTokenInRootConfig(t *testing.T) {

_, err2 = f.WriteString(`
[main]
host = https://www.transifex.com
host = https://app.transifex.com
[projslug.ares]
file_filter = locale/<lang>.po
minimum_perc = 0
Expand Down Expand Up @@ -479,7 +479,7 @@ func TestNoTransifexRcFile(t *testing.T) {

_, err2 := f.WriteString(`
[main]
host = https://www.transifex.com
host = https://app.transifex.com
[projslug.ares]
file_filter = locale/<lang>.po
minimum_perc = 0
Expand Down Expand Up @@ -606,9 +606,9 @@ func TestResourceMigrationFailed(t *testing.T) {
defer f.Close()

_, err2 := f.WriteString(`
[https://www.transifex.com]
[https://app.transifex.com]
api_hostname = https://api.transifex.com
hostname = https://www.transifex.com
hostname = https://app.transifex.com
username = api
password = apassword
`)
Expand All @@ -627,7 +627,7 @@ func TestResourceMigrationFailed(t *testing.T) {

_, err2 = f.WriteString(`
[main]
host = https://www.transifex.com
host = https://app.transifex.com
[projslug1.ares]
file_filter = locale/<lang>.po
minimum_perc = 10
Expand Down Expand Up @@ -747,9 +747,9 @@ func TestBackUpFileCreated(t *testing.T) {
defer f.Close()

_, err2 := f.WriteString(`
[https://www.transifex.com]
[https://app.transifex.com]
api_hostname = https://api.transifex.com
hostname = https://www.transifex.com
hostname = https://app.transifex.com
username = api
password = apassword
`)
Expand All @@ -768,7 +768,7 @@ func TestBackUpFileCreated(t *testing.T) {

_, err2 = f.WriteString(`
[main]
host = https://www.transifex.com
host = https://app.transifex.com
[projslug.ares]
file_filter = locale/<lang>.po
minimum_perc = 0
Expand Down

0 comments on commit 4e20586

Please sign in to comment.