Skip to content

Commit d913c20

Browse files
feat: lingo.dev run (#782)
* feat: parallel run * fix: provider typing mismatch * chore: add changesets
1 parent bf167f4 commit d913c20

67 files changed

Lines changed: 3587 additions & 4458 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/famous-cups-promise.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@lingo.dev/_spec": patch
3+
"lingo.dev": patch
4+
"@lingo.dev/_sdk": patch
5+
---
6+
7+
parallel processing

packages/cli/demo/android/de.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/cli/demo/android/fr.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/cli/demo/android/ru.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<resources>
2+
<string name="sign_in_agreeement_text_1">"Я принимаю "</string>
3+
<string name="sign_in_agreeement_text_2">" и подтверждаю "</string>
4+
</resources>

packages/cli/demo/csv/file.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
id,en,es
2-
dashboard.title,Dashboard,Panel de control
3-
greeting.message,Hello world!,¡Hola mundo!
1+
id,en,es,ru
2+
dashboard.title,Dashboard,Panel de control,Панель управления
3+
greeting.message,Hello world!,¡Hola mundo!,"Привет, мир!"

packages/cli/demo/dato/page.json5

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/cli/demo/flutter/es.arb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
}
1616
},
17-
"pluralMessage": "{count, plural, =0{Ningún elemento} =1{Un elemento} other{{count} elementos}}",
17+
"pluralMessage": "{count, plural, =0{Sin elementos} =1{Un elemento} other{{count} elementos}}",
1818
"@pluralMessage": {
1919
"description": "A message with plural forms",
2020
"placeholders": {
@@ -24,7 +24,7 @@
2424
}
2525
}
2626
},
27-
"genderMessage": "{gender, select, male{A él} female{A ella} other{A ellos}} le gustó tu publicación.",
27+
"genderMessage": "{gender, select, male{Él} female{Ella} other{Ellos}} le gustó tu publicación.",
2828
"@genderMessage": {
2929
"description": "A gender-specific message",
3030
"placeholders": {
@@ -57,7 +57,7 @@
5757
}
5858
}
5959
},
60-
"currencyMessage": "Tu saldo es de {amount}",
60+
"currencyMessage": "Tu saldo es {amount}",
6161
"@currencyMessage": {
6262
"description": "A message with a currency amount",
6363
"placeholders": {
@@ -90,7 +90,7 @@
9090
}
9191
}
9292
},
93-
"complexMessage": "El {date}, {name} {gender, select, male{invitó a} female{invitó a} other{invitó a}} {guestCount, plural, =0{ningún invitado} =1{un invitado} other{{guestCount} invitados}} a {eventName}.",
93+
"complexMessage": "El {date}, {name} {gender, select, male{invitó a sus} female{invitó a sus} other{invitó a sus}} {guestCount, plural, =0{ningún invitado} =1{un invitado} other{{guestCount} invitados}} a {eventName}.",
9494
"@complexMessage": {
9595
"description": "A complex message combining multiple placeholders, gender, and plurals",
9696
"placeholders": {
@@ -119,11 +119,11 @@
119119
"@escapeMessage": {
120120
"description": "A message demonstrating how to escape special characters"
121121
},
122-
"multilineMessage": "Este es un mensaje largo\nque abarca varias líneas\ny preserva los saltos de línea.",
122+
"multilineMessage": "Este es un mensaje largo\nque abarca múltiples líneas\ny preserva los saltos de línea.",
123123
"@multilineMessage": {
124124
"description": "A multiline message"
125125
},
126-
"htmlMessage": "Este mensaje contiene etiquetas <b>HTML</b> como <i>cursiva</i> y <u>subrayado</u>.",
126+
"htmlMessage": "Este mensaje contiene etiquetas <b>HTML</b> como <i>cursivas</i> y <u>subrayado</u>.",
127127
"@htmlMessage": {
128128
"description": "A message with HTML tags (note: handling these requires additional processing in the app)"
129129
}

packages/cli/demo/flutter/ru.arb

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"@@locale": "ru",
3+
"simpleMessage": "Это простое сообщение.",
4+
"@simpleMessage": {
5+
"description": "A basic message without any placeholders"
6+
},
7+
"messageWithPlaceholder": "Привет, {name}!",
8+
"@messageWithPlaceholder": {
9+
"description": "A greeting with a name placeholder",
10+
"placeholders": {
11+
"name": {
12+
"type": "String",
13+
"example": "John"
14+
}
15+
}
16+
},
17+
"pluralMessage": "{count, plural, =0{Нет элементов} =1{Один элемент} other{{count} элементов}}",
18+
"@pluralMessage": {
19+
"description": "A message with plural forms",
20+
"placeholders": {
21+
"count": {
22+
"type": "num",
23+
"format": "compact"
24+
}
25+
}
26+
},
27+
"genderMessage": "{gender, select, male{Он} female{Она} other{Они}} понравился ваш пост.",
28+
"@genderMessage": {
29+
"description": "A gender-specific message",
30+
"placeholders": {
31+
"gender": {
32+
"type": "String"
33+
}
34+
}
35+
},
36+
"nestedMessage": "У вас {count, plural, =0{нет новых сообщений} =1{одно новое сообщение} other{{count} новых сообщений}} и {unread, plural, =0{нет непрочитанных писем} =1{одно непрочитанное письмо} other{{unread} непрочитанных писем}}.",
37+
"@nestedMessage": {
38+
"description": "A message with nested plurals",
39+
"placeholders": {
40+
"count": {
41+
"type": "num",
42+
"format": "compact"
43+
},
44+
"unread": {
45+
"type": "num",
46+
"format": "compact"
47+
}
48+
}
49+
},
50+
"dateMessage": "Сегодня {date}",
51+
"@dateMessage": {
52+
"description": "A message with a date",
53+
"placeholders": {
54+
"date": {
55+
"type": "DateTime",
56+
"format": "yMMMd"
57+
}
58+
}
59+
},
60+
"currencyMessage": "Ваш баланс: {amount}",
61+
"@currencyMessage": {
62+
"description": "A message with a currency amount",
63+
"placeholders": {
64+
"amount": {
65+
"type": "double",
66+
"format": "currency",
67+
"optionalParameters": {
68+
"symbol": "$",
69+
"decimalDigits": 2
70+
}
71+
}
72+
}
73+
},
74+
"percentMessage": "Вы завершили {percent} задачи.",
75+
"@percentMessage": {
76+
"description": "A message with a percentage",
77+
"placeholders": {
78+
"percent": {
79+
"type": "double",
80+
"format": "percentPattern"
81+
}
82+
}
83+
},
84+
"listMessage": "Ваши любимые фрукты: {fruits}",
85+
"@listMessage": {
86+
"description": "A message with a list",
87+
"placeholders": {
88+
"fruits": {
89+
"type": "List<String>"
90+
}
91+
}
92+
},
93+
"complexMessage": "На {date} {name} {gender, select, male{пригласил своего} female{пригласила свою} other{пригласили своего}} {guestCount, plural, =0{гостей не было} =1{одного гостя} other{{guestCount} гостей}} на {eventName}.",
94+
"@complexMessage": {
95+
"description": "A complex message combining multiple placeholders, gender, and plurals",
96+
"placeholders": {
97+
"date": {
98+
"type": "DateTime",
99+
"format": "yMMMd"
100+
},
101+
"name": {
102+
"type": "String",
103+
"example": "Alice"
104+
},
105+
"gender": {
106+
"type": "String"
107+
},
108+
"guestCount": {
109+
"type": "num",
110+
"format": "compact"
111+
},
112+
"eventName": {
113+
"type": "String",
114+
"example": "Birthday Party"
115+
}
116+
}
117+
},
118+
"escapeMessage": "Чтобы использовать фигурные скобки, экранируйте их так: '{' и '}'.",
119+
"@escapeMessage": {
120+
"description": "A message demonstrating how to escape special characters"
121+
},
122+
"multilineMessage": "Это длинное сообщение\nкоторое занимает несколько строк\nи сохраняет разрывы строк.",
123+
"@multilineMessage": {
124+
"description": "A multiline message"
125+
},
126+
"htmlMessage": "Это сообщение содержит теги <b>HTML</b>, такие как <i>курсив</i> и <u>подчёркивание</u>.",
127+
"@htmlMessage": {
128+
"description": "A message with HTML tags (note: handling these requires additional processing in the app)"
129+
}
130+
}

packages/cli/demo/html/es.html

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
<!doctype html>
2-
<html lang="es">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<meta name="description" content="Esta meta descripción necesita localización" />
6-
<meta name="keywords" content="localización, i18n, ejemplo, demostración" />
1+
<!DOCTYPE html><html lang="es"><head>
2+
<meta charset="UTF-8">
3+
<meta name="description" content="Esta metadescripción necesita localización">
4+
<meta name="keywords" content="localización, i18n, ejemplo, demo">
75
<title>Bienvenido a la demostración de localización</title>
86
</head>
97
<body>
108
<!-- Text in attributes -->
11-
<img src="logo.png" alt="Logo de la empresa" title="Hover to see this tooltip" />
12-
<input type="text" placeholder="Introduce tu nombre" aria-label="Name input field" />
9+
<img src="logo.png" alt="Logo de la empresa" title="Hover to see this tooltip">
10+
<input type="text" placeholder="Introduce tu nombre" aria-label="Name input field">
1311

1412
<!-- Plain text content -->
15-
<h1>Bienvenido a nuestra página web</h1>
13+
<h1>Bienvenido a nuestro sitio web</h1>
1614
<p>Este es un párrafo simple que necesita ser traducido.</p>
1715

1816
<!-- Text with HTML entities -->
19-
<p>Precio: 99,99 € — ¡Oferta especial!</p>
17+
<p>Precio: €99.99 — ¡Oferta especial!</p>
2018

2119
<!-- Text with variables -->
22-
<div>¡Hola, {username}! Tienes {count} mensajes.</div>
20+
<div>Hola, {username}! Tienes {count} mensajes.</div>
2321

2422
<!-- Text in different contexts -->
2523
<button type="button" aria-label="Close dialog">Cerrar</button>
@@ -28,30 +26,24 @@ <h1>Bienvenido a nuestra página web</h1>
2826
<!-- Lists with text -->
2927
<ul>
3028
<li>El primer elemento necesita traducción</li>
31-
<li>
32-
Segundo elemento con
33-
<strong>texto formateado</strong>
34-
</li>
35-
<li>
36-
Tercer elemento con un
37-
<a href="#">enlace dentro</a>
38-
</li>
29+
<li>Segundo elemento con<strong>texto formateado</strong></li>
30+
<li>Tercer elemento con un<a href="#">enlace dentro</a></li>
3931
</ul>
4032

4133
<!-- Form elements -->
4234
<form>
4335
<label for="email">Dirección de correo electrónico:</label>
44-
<input type="email" id="email" required="" />
36+
<input type="email" id="email" required="">
4537
<select aria-label="Choose your country">
46-
<option value="">Por favor, selecciona</option>
38+
<option value="">Por favor selecciona</option>
4739
<option value="us">Estados Unidos</option>
4840
<option value="uk">Reino Unido</option>
4941
</select>
5042
<button type="submit">Enviar mensaje</button>
5143
</form>
5244

5345
<!-- Text with special characters -->
54-
<p>Los caracteres especiales: "comillas" y 'apóstrofes' necesitan atención!</p>
46+
<p>Caracteres especiales: "comillas" y 'apóstrofes' ¡necesitan atención!</p>
5547

5648
<!-- Dynamic content -->
5749
<div id="notification" role="alert" aria-live="polite">¡Has iniciado sesión correctamente!</div>
@@ -74,10 +66,7 @@ <h1>Bienvenido a nuestra página web</h1>
7466
<!-- Footer with multiple text elements -->
7567
<footer>
7668
<p>© 2024 Nombre de la empresa. Todos los derechos reservados.</p>
77-
<small>
78-
Texto legal que necesita traducción |
79-
<a href="/privacy">Política de privacidad</a>
80-
</small>
69+
<small>Texto legal que necesita traducción |<a href="/privacy">Política de privacidad</a></small>
8170
</footer>
82-
</body>
83-
</html>
71+
72+
</body></html>

packages/cli/demo/html/ru.html

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<!DOCTYPE html><html lang="ru"><head>
2+
<meta charset="UTF-8">
3+
<meta name="description" content="Это метаописание нуждается в локализации">
4+
<meta name="keywords" content="локализация, i18n, пример, демо">
5+
<title>Добро пожаловать в демонстрацию локализации</title>
6+
</head>
7+
<body>
8+
<!-- Text in attributes -->
9+
<img src="logo.png" alt="Логотип компании" title="Hover to see this tooltip">
10+
<input type="text" placeholder="Введите ваше имя" aria-label="Name input field">
11+
12+
<!-- Plain text content -->
13+
<h1>Добро пожаловать на наш сайт</h1>
14+
<p>Это простой абзац, который нужно перевести.</p>
15+
16+
<!-- Text with HTML entities -->
17+
<p>Цена: €99.99 — Специальное предложение!</p>
18+
19+
<!-- Text with variables -->
20+
<div>Привет, {username}! У вас {count} сообщений.</div>
21+
22+
<!-- Text in different contexts -->
23+
<button type="button" aria-label="Close dialog">Закрыть</button>
24+
<a href="/about" title="Узнайте больше о нас">О нас</a>
25+
26+
<!-- Lists with text -->
27+
<ul>
28+
<li>Первый элемент нуждается в переводе</li>
29+
<li>Второй элемент с<strong>отформатированным текстом</strong></li>
30+
<li>Третий элемент с<a href="#">ссылкой внутри</a></li>
31+
</ul>
32+
33+
<!-- Form elements -->
34+
<form>
35+
<label for="email">Адрес электронной почты:</label>
36+
<input type="email" id="email" required="">
37+
<select aria-label="Choose your country">
38+
<option value="">Пожалуйста, выберите</option>
39+
<option value="us">Соединенные Штаты</option>
40+
<option value="uk">Соединенное Королевство</option>
41+
</select>
42+
<button type="submit">Отправить сообщение</button>
43+
</form>
44+
45+
<!-- Text with special characters -->
46+
<p>Специальные символы: "кавычки" и 'апострофы' требуют внимания!</p>
47+
48+
<!-- Dynamic content -->
49+
<div id="notification" role="alert" aria-live="polite">Вы успешно вошли в систему!</div>
50+
51+
<!-- Text in JavaScript -->
52+
<script>
53+
const messages = {
54+
welcome: "Welcome back!",
55+
error: "Something went wrong.",
56+
confirm: "Are you sure you want to continue?",
57+
};
58+
</script>
59+
60+
<style>
61+
.test {
62+
content: "This does not need translation";
63+
}
64+
</style>
65+
66+
<!-- Footer with multiple text elements -->
67+
<footer>
68+
<p>© 2024 Название компании. Все права защищены.</p>
69+
<small>Юридический текст, который требуется перевести |<a href="/privacy">Политика конфиденциальности</a></small>
70+
</footer>
71+
72+
</body></html>

0 commit comments

Comments
 (0)