sqlite_graphrag/i18n/validation/
messages_c.rs1use crate::i18n::{current, Language};
4
5pub fn name_required_positional_or_flag() -> String {
7 match current() {
8 Language::English => "name required: pass as positional argument or via --name".to_string(),
9 Language::Portuguese => {
10 "nome obrigatório: passe como argumento posicional ou via --name".to_string()
11 }
12 }
13}
14
15pub fn api_key_cannot_be_empty() -> String {
17 match current() {
18 Language::English => "API key cannot be empty".to_string(),
19 Language::Portuguese => "chave de API não pode ser vazia".to_string(),
20 }
21}
22
23pub fn from_type_required_batch() -> String {
25 match current() {
26 Language::English => "--from-type is required in batch mode".to_string(),
27 Language::Portuguese => "--from-type é obrigatório no modo batch".to_string(),
28 }
29}
30
31pub fn to_type_required_batch() -> String {
33 match current() {
34 Language::English => "--to-type is required in batch mode".to_string(),
35 Language::Portuguese => "--to-type é obrigatório no modo batch".to_string(),
36 }
37}
38
39pub fn name_required_single_mode() -> String {
41 match current() {
42 Language::English => "--name is required in single mode".to_string(),
43 Language::Portuguese => "--name é obrigatório no modo single".to_string(),
44 }
45}
46
47pub fn target_required_single_mode() -> String {
49 match current() {
50 Language::English => "--target is required in single mode".to_string(),
51 Language::Portuguese => "--target é obrigatório no modo single".to_string(),
52 }
53}
54
55pub fn entity_required_when_memory() -> String {
57 match current() {
58 Language::English => "--entity is required when --memory is used".to_string(),
59 Language::Portuguese => "--entity é obrigatório quando --memory é usado".to_string(),
60 }
61}
62
63pub fn from_required_without_entity_all() -> String {
65 match current() {
66 Language::English => "--from is required when --entity/--all is not used".to_string(),
67 Language::Portuguese => {
68 "--from é obrigatório quando --entity/--all não é usado".to_string()
69 }
70 }
71}
72
73pub fn to_required_without_entity_all() -> String {
75 match current() {
76 Language::English => "--to is required when --entity/--all is not used".to_string(),
77 Language::Portuguese => "--to é obrigatório quando --entity/--all não é usado".to_string(),
78 }
79}
80
81pub fn name_must_not_be_empty() -> String {
83 match current() {
84 Language::English => "name must not be empty".to_string(),
85 Language::Portuguese => "nome não pode ser vazio".to_string(),
86 }
87}
88
89pub fn source_target_names_identical() -> String {
91 match current() {
92 Language::English => "source and target names are identical".to_string(),
93 Language::Portuguese => "nomes de origem e destino são idênticos".to_string(),
94 }
95}
96
97pub fn source_target_entity_names_identical() -> String {
99 match current() {
100 Language::English => "source and target entity names are identical".to_string(),
101 Language::Portuguese => "nomes de entidade de origem e destino são idênticos".to_string(),
102 }
103}
104
105pub fn empty_version_string() -> String {
107 match current() {
108 Language::English => "empty version string".to_string(),
109 Language::Portuguese => "string de versão vazia".to_string(),
110 }
111}
112
113pub fn failed_to_open_codex_stdin() -> String {
115 match current() {
116 Language::English => "failed to open codex stdin".to_string(),
117 Language::Portuguese => "falha ao abrir stdin do codex".to_string(),
118 }
119}
120
121pub fn failed_to_open_claude_stdin() -> String {
123 match current() {
124 Language::English => "failed to open claude stdin".to_string(),
125 Language::Portuguese => "falha ao abrir stdin do claude".to_string(),
126 }
127}
128
129pub fn stdin_thread_panicked() -> String {
131 match current() {
132 Language::English => "stdin thread panicked".to_string(),
133 Language::Portuguese => "thread de stdin entrou em pânico".to_string(),
134 }
135}
136
137pub fn codex_version_not_utf8() -> String {
139 match current() {
140 Language::English => "codex --version output is not UTF-8".to_string(),
141 Language::Portuguese => "saída de codex --version não é UTF-8".to_string(),
142 }
143}
144
145pub fn claude_version_not_utf8() -> String {
147 match current() {
148 Language::English => "claude --version output is not UTF-8".to_string(),
149 Language::Portuguese => "saída de claude --version não é UTF-8".to_string(),
150 }
151}
152
153pub fn codex_exec_stdout_not_utf8() -> String {
155 match current() {
156 Language::English => "codex exec stdout is not valid UTF-8".to_string(),
157 Language::Portuguese => "stdout de codex exec não é UTF-8 válido".to_string(),
158 }
159}
160
161pub fn codex_stdout_not_utf8() -> String {
163 match current() {
164 Language::English => "codex stdout is not valid UTF-8".to_string(),
165 Language::Portuguese => "stdout do codex não é UTF-8 válido".to_string(),
166 }
167}
168
169pub fn claude_p_stdout_not_utf8() -> String {
171 match current() {
172 Language::English => "claude -p stdout is not valid UTF-8".to_string(),
173 Language::Portuguese => "stdout de claude -p não é UTF-8 válido".to_string(),
174 }
175}
176
177pub fn opencode_stdout_not_utf8() -> String {
179 match current() {
180 Language::English => "opencode stdout is not valid UTF-8".to_string(),
181 Language::Portuguese => "stdout do opencode não é UTF-8 válido".to_string(),
182 }
183}
184
185pub fn codex_no_agent_message() -> String {
187 match current() {
188 Language::English => "codex output contained no agent_message item".to_string(),
189 Language::Portuguese => "saída do codex não continha item agent_message".to_string(),
190 }
191}
192
193pub fn codex_agent_message_not_json_object() -> String {
195 match current() {
196 Language::English => "codex agent_message is not a JSON object".to_string(),
197 Language::Portuguese => "agent_message do codex não é um objeto JSON".to_string(),
198 }
199}
200
201pub fn claude_output_missing_result() -> String {
203 match current() {
204 Language::English => "claude output missing 'result' element".to_string(),
205 Language::Portuguese => "saída do claude sem elemento 'result'".to_string(),
206 }
207}
208
209pub fn llm_missing_description_field() -> String {
211 match current() {
212 Language::English => "LLM result missing 'description' field".to_string(),
213 Language::Portuguese => "resultado LLM sem campo 'description'".to_string(),
214 }
215}
216
217pub fn llm_missing_enriched_body_field() -> String {
219 match current() {
220 Language::English => "LLM result missing 'enriched_body' field".to_string(),
221 Language::Portuguese => "resultado LLM sem campo 'enriched_body'".to_string(),
222 }
223}
224
225pub fn llm_missing_calibrated_weight() -> String {
227 match current() {
228 Language::English => "LLM result missing 'calibrated_weight'".to_string(),
229 Language::Portuguese => "resultado LLM sem 'calibrated_weight'".to_string(),
230 }
231}
232
233pub fn llm_missing_relation() -> String {
235 match current() {
236 Language::English => "LLM result missing 'relation'".to_string(),
237 Language::Portuguese => "resultado LLM sem 'relation'".to_string(),
238 }
239}
240
241pub fn openrouter_chat_timed_out() -> String {
243 match current() {
244 Language::English => "OpenRouter chat request timed out".to_string(),
245 Language::Portuguese => "requisição de chat OpenRouter expirou (timeout)".to_string(),
246 }
247}
248
249pub fn openrouter_invalid_api_key_401() -> String {
251 match current() {
252 Language::English => "invalid OpenRouter API key (HTTP 401)".to_string(),
253 Language::Portuguese => "chave de API OpenRouter inválida (HTTP 401)".to_string(),
254 }
255}
256
257pub fn openrouter_chat_max_retries() -> String {
259 match current() {
260 Language::English => "max retries exceeded for OpenRouter chat request".to_string(),
261 Language::Portuguese => {
262 "número máximo de tentativas excedido para requisição de chat OpenRouter".to_string()
263 }
264 }
265}
266
267pub fn anthropic_api_key_oauth_required() -> String {
269 match current() {
270 Language::English => "ANTHROPIC_API_KEY is set; v1.0.76 requires OAuth. unset it and use `claude login` instead."
271 .to_string(),
272 Language::Portuguese => "ANTHROPIC_API_KEY está definida; v1.0.76 exige OAuth. remova-a e use `claude login`."
273 .to_string(),
274 }
275}
276
277pub fn openai_api_key_oauth_required() -> String {
279 match current() {
280 Language::English => {
281 "OPENAI_API_KEY is set; v1.0.76 requires OAuth. unset it and use `codex login` instead."
282 .to_string()
283 }
284 Language::Portuguese => {
285 "OPENAI_API_KEY está definida; v1.0.76 exige OAuth. remova-a e use `codex login`."
286 .to_string()
287 }
288 }
289}