Check a translation against the glossary
curl --request POST \
--url https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceText": "Sign in to continue",
"targetText": "Se connecter pour continuer",
"languageCode": "fr"
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check"
payload = {
"sourceText": "Sign in to continue",
"targetText": "Se connecter pour continuer",
"languageCode": "fr"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceText: 'Sign in to continue',
targetText: 'Se connecter pour continuer',
languageCode: 'fr'
})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceText' => 'Sign in to continue',
'targetText' => 'Se connecter pour continuer',
'languageCode' => 'fr'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check"
payload := strings.NewReader("{\n \"sourceText\": \"Sign in to continue\",\n \"targetText\": \"Se connecter pour continuer\",\n \"languageCode\": \"fr\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceText\": \"Sign in to continue\",\n \"targetText\": \"Se connecter pour continuer\",\n \"languageCode\": \"fr\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceText\": \"Sign in to continue\",\n \"targetText\": \"Se connecter pour continuer\",\n \"languageCode\": \"fr\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"issues": [
{
"termId": "a1b2c3d4-0000-4000-8000-000000000020",
"term": "Sign in",
"glossaryId": "a1b2c3d4-0000-4000-8000-000000000010",
"glossaryName": "Brand Terms",
"severity": "error",
"kind": "missing_term",
"message": "Expected term \"Se connecter\" for \"Sign in\" was not found.",
"expected": "Se connecter",
"found": "connectez-vous"
}
]
}
}Glossary
Check a translation against the glossary
Terminology QA for a proposed translation. Reports where a required term is missing, a forbidden or deprecated term was used, or a do-not-translate term was translated.
Severity comes from each glossary’s own QA settings, so a rule configured as a warning does not read as an error.
Constraints:
- Returns an empty issue list when the glossary feature is disabled for the org or the project.
- Issue kinds: missing_term, forbidden_term, deprecated_term, dnt_violation.
POST
/
projects
/
{projectId}
/
glossary
/
check
Check a translation against the glossary
curl --request POST \
--url https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceText": "Sign in to continue",
"targetText": "Se connecter pour continuer",
"languageCode": "fr"
}
'import requests
url = "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check"
payload = {
"sourceText": "Sign in to continue",
"targetText": "Se connecter pour continuer",
"languageCode": "fr"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceText: 'Sign in to continue',
targetText: 'Se connecter pour continuer',
languageCode: 'fr'
})
};
fetch('https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceText' => 'Sign in to continue',
'targetText' => 'Se connecter pour continuer',
'languageCode' => 'fr'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check"
payload := strings.NewReader("{\n \"sourceText\": \"Sign in to continue\",\n \"targetText\": \"Se connecter pour continuer\",\n \"languageCode\": \"fr\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceText\": \"Sign in to continue\",\n \"targetText\": \"Se connecter pour continuer\",\n \"languageCode\": \"fr\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.textsetu.com/api/v1/projects/{projectId}/glossary/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceText\": \"Sign in to continue\",\n \"targetText\": \"Se connecter pour continuer\",\n \"languageCode\": \"fr\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"issues": [
{
"termId": "a1b2c3d4-0000-4000-8000-000000000020",
"term": "Sign in",
"glossaryId": "a1b2c3d4-0000-4000-8000-000000000010",
"glossaryName": "Brand Terms",
"severity": "error",
"kind": "missing_term",
"message": "Expected term \"Se connecter\" for \"Sign in\" was not found.",
"expected": "Se connecter",
"found": "connectez-vous"
}
]
}
}Authorizations
API token: tsu_pat_… (PAT) or tsu_proj_… (project token). The token's granted RBAC permissions determine access; see each operation's x-permission.
Path Parameters
Project id (UUID) or id-embedded path slug.
Body
application/json
The original source string the translation was produced from.
Example:
"Sign in to continue"
The proposed translation to validate against the glossary.
Example:
"Se connecter pour continuer"
Language code of the target text.
Minimum string length:
1Example:
"fr"

