Commit eb13ee51af412baf0306c5fdc260ffbbce3dd985

Authored by Perry Werneck
1 parent 446ad017

Updating translation.

Fixing automatic path detection.
@@ -210,6 +210,13 @@ $(POTDIR)/%.pot: \ @@ -210,6 +210,13 @@ $(POTDIR)/%.pot: \
210 @$(MAKE) -C src/$(basename $(notdir $@)) $@ 210 @$(MAKE) -C src/$(basename $(notdir $@)) $@
211 211
212 $(POTDIR)/%.pot: \ 212 $(POTDIR)/%.pot: \
  213 + /usr/share/pw3270/pot/%.pot
  214 +
  215 + @echo $(notdir $@) ...
  216 + @mkdir -p `dirname $@`
  217 + @cp "$^" $@
  218 +
  219 +$(POTDIR)/%.pot: \
213 ./modules/%/* \ 220 ./modules/%/* \
214 ./modules/%/src/* \ 221 ./modules/%/src/* \
215 ./modules/%/Makefile 222 ./modules/%/Makefile
@@ -7,7 +7,9 @@ @@ -7,7 +7,9 @@
7 # https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html 7 # https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html
8 # 8 #
9 # git remote add bitbucket https://bitbucket.org/pw3270/pw3270-application.git 9 # git remote add bitbucket https://bitbucket.org/pw3270/pw3270-application.git
  10 +# git remote add github https://github.com/PerryWerneck/pw3270.git
10 # 11 #
  12 +
11 # git remote add github https://github.com/PerryWerneck/pw3270.git 13 # git remote add github https://github.com/PerryWerneck/pw3270.git
12 # git push github --all 14 # git push github --all
13 # 15 #
locale/pt_BR.po
1 # 1 #
2 -# Perry Werneck <perry.werneck@gmail.com>, 2012, 2013, 2014, 2016, 2017, 2018. 2 +# Perry Werneck <perry.werneck@gmail.com>, 2012, 2013, 2014, 2016, 2017, 2018, 2019.
3 # 3 #
4 #: properties.c:66 properties.c:73 properties.c:80 properties.c:101 4 #: properties.c:66 properties.c:73 properties.c:80 properties.c:101
5 #: properties.c:108 properties.c:115 properties.c:122 properties.c:136 5 #: properties.c:108 properties.c:115 properties.c:122 properties.c:136
6 -#: properties.c:143 properties.c:348 properties.c:355 properties.c:362  
7 -#: properties.c:369 properties.c:376 properties.c:383 6 +#: properties.c:143 properties.c:347 properties.c:354 properties.c:361
  7 +#: properties.c:368 properties.c:375 properties.c:382
8 msgid "" 8 msgid ""
9 msgstr "" 9 msgstr ""
10 "Project-Id-Version: pw3270 5.0\n" 10 "Project-Id-Version: pw3270 5.0\n"
11 "Report-Msgid-Bugs-To: \n" 11 "Report-Msgid-Bugs-To: \n"
12 -"POT-Creation-Date: 2019-01-16 17:05-0200\n"  
13 -"PO-Revision-Date: 2018-10-22 14:38-0300\n" 12 +"POT-Creation-Date: 2019-01-17 15:13-0200\n"
  13 +"PO-Revision-Date: 2019-01-17 15:24-0200\n"
14 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" 14 "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n"
15 "Language-Team: Português <>\n" 15 "Language-Team: Português <>\n"
16 "Language: pt_BR\n" 16 "Language: pt_BR\n"
@@ -20,7 +20,7 @@ msgstr &quot;&quot; @@ -20,7 +20,7 @@ msgstr &quot;&quot;
20 "X-Poedit-Language: Portuguese\n" 20 "X-Poedit-Language: Portuguese\n"
21 "X-Poedit-Country: BRAZIL\n" 21 "X-Poedit-Country: BRAZIL\n"
22 "X-Poedit-SourceCharset: utf-8\n" 22 "X-Poedit-SourceCharset: utf-8\n"
23 -"Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 +"Plural-Forms: nplurals=2; plural=(n > 1);\n"
24 "X-Generator: Gtranslator 2.91.7\n" 24 "X-Generator: Gtranslator 2.91.7\n"
25 25
26 #: window.c:428 26 #: window.c:428
@@ -399,7 +399,7 @@ msgstr &quot;Tema de c_ores:&quot; @@ -399,7 +399,7 @@ msgstr &quot;Tema de c_ores:&quot;
399 msgid "C_onnect" 399 msgid "C_onnect"
400 msgstr "_Conectar" 400 msgstr "_Conectar"
401 401
402 -#: toggles.c:333 linux/connect.c:314 402 +#: toggles.c:333 linux/connect.c:317
403 #, c-format 403 #, c-format
404 msgid "Can't %s network keep-alive" 404 msgid "Can't %s network keep-alive"
405 msgstr "Não foi possível %s opção \"keep-alive\"" 405 msgstr "Não foi possível %s opção \"keep-alive\""
@@ -410,9 +410,8 @@ msgid &quot;Can&#39;t accept unnamed %s&quot; @@ -410,9 +410,8 @@ msgid &quot;Can&#39;t accept unnamed %s&quot;
410 msgstr "Não posso aceitar elemento %s sem nome" 410 msgstr "Não posso aceitar elemento %s sem nome"
411 411
412 #: ssl/linux/getcrl.c:230 412 #: ssl/linux/getcrl.c:230
413 -#, fuzzy  
414 msgid "Can't bind to LDAP server" 413 msgid "Can't bind to LDAP server"
415 -msgstr "Não foi possível conectar ao servidor DBUS" 414 +msgstr "Não foi possível conectar ao servidor LDAP"
416 415
417 #: linux/connect.c:89 416 #: linux/connect.c:89
418 #, c-format 417 #, c-format
@@ -454,6 +453,11 @@ msgstr &quot;um atributo \&quot;action\&quot;&quot; @@ -454,6 +453,11 @@ msgstr &quot;um atributo \&quot;action\&quot;&quot;
454 msgid "Can't get file size" 453 msgid "Can't get file size"
455 msgstr "Não foi possível obter o tamanho do arquivo" 454 msgstr "Não foi possível obter o tamanho do arquivo"
456 455
  456 +#: local/session.cc:124 local/session.cc:142
  457 +#, fuzzy
  458 +msgid "Can't get screen contents"
  459 +msgstr "Trace do conteúdo da tela"
  460 +
457 #: ssl/linux/getcrl.c:208 461 #: ssl/linux/getcrl.c:208
458 #, fuzzy 462 #, fuzzy
459 msgid "Can't initialize LDAP" 463 msgid "Can't initialize LDAP"
@@ -559,18 +563,16 @@ msgid &quot;Can&#39;t save trace data to file %s&quot; @@ -559,18 +563,16 @@ msgid &quot;Can&#39;t save trace data to file %s&quot;
559 msgstr "Não foi possível salvar trace no arquivo %s" 563 msgstr "Não foi possível salvar trace no arquivo %s"
560 564
561 #: ssl/linux/getcrl.c:255 565 #: ssl/linux/getcrl.c:255
562 -#, fuzzy  
563 msgid "Can't search LDAP server" 566 msgid "Can't search LDAP server"
564 -msgstr "Não foi possível conectar ao servidor DBUS" 567 +msgstr "Não foi possível conectar ao servidor LDAP"
565 568
566 #: ssl/linux/getcrl.c:192 569 #: ssl/linux/getcrl.c:192
567 msgid "Can't set LDAP query" 570 msgid "Can't set LDAP query"
568 -msgstr "" 571 +msgstr "Não posso definir consulta LDAP"
569 572
570 #: ssl/linux/getcrl.c:219 573 #: ssl/linux/getcrl.c:219
571 -#, fuzzy  
572 msgid "Can't set LDAP version" 574 msgid "Can't set LDAP version"
573 -msgstr "Não é possível usar a Winsock versão %d.%d" 575 +msgstr "Não é possível setar a versão LDAP"
574 576
575 #: src/v3270ft/v3270ftprogress.c:811 577 #: src/v3270ft/v3270ftprogress.c:811
576 msgid "Can't set callback table" 578 msgid "Can't set callback table"
@@ -581,7 +583,6 @@ msgid &quot;Can&#39;t set host charset&quot; @@ -581,7 +583,6 @@ msgid &quot;Can&#39;t set host charset&quot;
581 msgstr "Não foi possível definir o charset do host" 583 msgstr "Não foi possível definir o charset do host"
582 584
583 #: src/v3270/iocallback.c:190 585 #: src/v3270/iocallback.c:190
584 -#, fuzzy  
585 msgid "Can't set lib3270 I/O controller" 586 msgid "Can't set lib3270 I/O controller"
586 msgstr "Não foi possível registrar manipuladores de I/O 3270" 587 msgstr "Não foi possível registrar manipuladores de I/O 3270"
587 588
@@ -703,7 +704,7 @@ msgstr &quot;Conectar ao iniciar&quot; @@ -703,7 +704,7 @@ msgstr &quot;Conectar ao iniciar&quot;
703 msgid "Connecting to host" 704 msgid "Connecting to host"
704 msgstr "Conectando ao servidor" 705 msgstr "Conectando ao servidor"
705 706
706 -#: iocalls.c:539 linux/connect.c:273 linux/connect.c:302 linux/connect.c:318 707 +#: iocalls.c:539 linux/connect.c:273 linux/connect.c:303 linux/connect.c:321
707 msgid "Connection error" 708 msgid "Connection error"
708 msgstr "Erro de conexão" 709 msgstr "Erro de conexão"
709 710
@@ -716,9 +717,8 @@ msgid &quot;Connection reset by peer&quot; @@ -716,9 +717,8 @@ msgid &quot;Connection reset by peer&quot;
716 msgstr "Conexão foi cancelada pelo servidor" 717 msgstr "Conexão foi cancelada pelo servidor"
717 718
718 #: properties.c:246 719 #: properties.c:246
719 -#, fuzzy  
720 msgid "Connection state" 720 msgid "Connection state"
721 -msgstr "Conectar ao iniciar" 721 +msgstr "Estado da conexão"
722 722
723 #: 00default.xml:58 723 #: 00default.xml:58
724 msgid "Copy" 724 msgid "Copy"
@@ -760,11 +760,11 @@ msgstr &quot;Arquivo atual&quot; @@ -760,11 +760,11 @@ msgstr &quot;Arquivo atual&quot;
760 760
761 #: properties.c:225 761 #: properties.c:225
762 msgid "Current screen width in columns" 762 msgid "Current screen width in columns"
763 -msgstr "" 763 +msgstr "Largura atua da tela em colunas"
764 764
765 #: properties.c:232 765 #: properties.c:232
766 msgid "Current screen width in rows" 766 msgid "Current screen width in rows"
767 -msgstr "" 767 +msgstr "Altura atual da tela em linhas"
768 768
769 #: src/v3270ft/v3270ftprogress.c:75 769 #: src/v3270ft/v3270ftprogress.c:75
770 msgid "Current transfer position" 770 msgid "Current transfer position"
@@ -776,7 +776,7 @@ msgstr &quot;Atual:&quot; @@ -776,7 +776,7 @@ msgstr &quot;Atual:&quot;
776 776
777 #: properties.c:204 777 #: properties.c:204
778 msgid "Cursor address" 778 msgid "Cursor address"
779 -msgstr "" 779 +msgstr "Endereço do cursor"
780 780
781 #: colors.c:380 781 #: colors.c:380
782 msgid "Custom colors" 782 msgid "Custom colors"
@@ -803,7 +803,6 @@ msgid &quot;Dark Green&quot; @@ -803,7 +803,6 @@ msgid &quot;Dark Green&quot;
803 msgstr "Verde Escuro" 803 msgstr "Verde Escuro"
804 804
805 #: colors.c:507 805 #: colors.c:507
806 -#, fuzzy  
807 msgid "Dark Turquoise" 806 msgid "Dark Turquoise"
808 msgstr "Turquesa Escuro" 807 msgstr "Turquesa Escuro"
809 808
@@ -905,6 +904,10 @@ msgstr &quot;Erro \&quot;%s\&quot; lendo arquivo local (rc=%d)&quot; @@ -905,6 +904,10 @@ msgstr &quot;Erro \&quot;%s\&quot; lendo arquivo local (rc=%d)&quot;
905 msgid "Error \"%s\" writing to local file (rc=%d)" 904 msgid "Error \"%s\" writing to local file (rc=%d)"
906 msgstr "Erro \"%s\" gravando arquivo local (rc=%d)" 905 msgstr "Erro \"%s\" gravando arquivo local (rc=%d)"
907 906
  907 +#: local/events.cc:59
  908 +msgid "Error in vasprintf"
  909 +msgstr "Erro na chamada vasprintf"
  910 +
908 #: dialog.c:404 911 #: dialog.c:404
909 #, c-format 912 #, c-format
910 msgid "Error loading %s" 913 msgid "Error loading %s"
@@ -976,9 +979,8 @@ msgid &quot;Format error in certificate&#39;s notBefore field&quot; @@ -976,9 +979,8 @@ msgid &quot;Format error in certificate&#39;s notBefore field&quot;
976 msgstr "Erro de formato no campo \"notBefore\" do certificado" 979 msgstr "Erro de formato no campo \"notBefore\" do certificado"
977 980
978 #: properties.c:171 981 #: properties.c:171
979 -#, fuzzy  
980 msgid "Formatted screen" 982 msgid "Formatted screen"
981 -msgstr "Salvar tela" 983 +msgstr "Tela formatada"
982 984
983 #: toggles.c:147 00default.xml:118 985 #: toggles.c:147 00default.xml:118
984 msgid "Full Screen" 986 msgid "Full Screen"
@@ -1005,9 +1007,8 @@ msgid &quot;Green&quot; @@ -1005,9 +1007,8 @@ msgid &quot;Green&quot;
1005 msgstr "Verde" 1007 msgstr "Verde"
1006 1008
1007 #: properties.c:157 1009 #: properties.c:157
1008 -#, fuzzy  
1009 msgid "Has selected area" 1010 msgid "Has selected area"
1010 -msgstr "Salvar seleção" 1011 +msgstr "Tem área selecionada"
1011 1012
1012 #: 00default.xml:140 1013 #: 00default.xml:140
1013 msgid "Help" 1014 msgid "Help"
@@ -1123,7 +1124,7 @@ msgstr &quot;Inserir um novo arquivo na fila de transferência&quot; @@ -1123,7 +1124,7 @@ msgstr &quot;Inserir um novo arquivo na fila de transferência&quot;
1123 1124
1124 #: ssl/linux/getcrl.c:193 1125 #: ssl/linux/getcrl.c:193
1125 msgid "Insuficient arguments" 1126 msgid "Insuficient arguments"
1126 -msgstr "" 1127 +msgstr "Argumentos insuficientes"
1127 1128
1128 #: colors.c:514 1129 #: colors.c:514
1129 msgid "Intensified/Protected" 1130 msgid "Intensified/Protected"
@@ -1138,11 +1139,10 @@ msgid &quot;Invalid CA certificate&quot; @@ -1138,11 +1139,10 @@ msgid &quot;Invalid CA certificate&quot;
1138 msgstr "Certificado CA inválido" 1139 msgstr "Certificado CA inválido"
1139 1140
1140 #: ssl/linux/getcrl.c:164 1141 #: ssl/linux/getcrl.c:164
1141 -#, fuzzy  
1142 msgid "Invalid argument format" 1142 msgid "Invalid argument format"
1143 -msgstr "Ação recortar inválida" 1143 +msgstr "O formato do argumento é inválido"
1144 1144
1145 -#: src/v3270/widget.c:940 1145 +#: local/session.cc:69 src/v3270/widget.c:940
1146 msgid "Invalid callback table, possible version mismatch in lib3270" 1146 msgid "Invalid callback table, possible version mismatch in lib3270"
1147 msgstr "" 1147 msgstr ""
1148 "Tabela de callbacks inválida, possível divergência de versão na lib3270" 1148 "Tabela de callbacks inválida, possível divergência de versão na lib3270"
@@ -1163,13 +1163,17 @@ msgstr &quot;Ação recortar inválida&quot; @@ -1163,13 +1163,17 @@ msgstr &quot;Ação recortar inválida&quot;
1163 msgid "Invalid remap scope" 1163 msgid "Invalid remap scope"
1164 msgstr "Escopo de mapeamento inválido" 1164 msgstr "Escopo de mapeamento inválido"
1165 1165
  1166 +#: local/events.cc:88 local/events.cc:141
  1167 +msgid "Invalid session handler"
  1168 +msgstr "Identificador de sessão é inválido"
  1169 +
1166 #: properties.c:164 1170 #: properties.c:164
1167 msgid "Is starting (no first screen)?" 1171 msgid "Is starting (no first screen)?"
1168 -msgstr "" 1172 +msgstr "Está iniciando (não recebeu a primeira tela)?"
1169 1173
1170 #: properties.c:150 1174 #: properties.c:150
1171 msgid "Is terminal in the INITIAL_E state?" 1175 msgid "Is terminal in the INITIAL_E state?"
1172 -msgstr "" 1176 +msgstr "O terminal está no estad INITIAL_E?"
1173 1177
1174 #: 80javasamples.xml:38 1178 #: 80javasamples.xml:38
1175 msgid "Java" 1179 msgid "Java"
@@ -1193,7 +1197,7 @@ msgstr &quot;Barra lateral&quot; @@ -1193,7 +1197,7 @@ msgstr &quot;Barra lateral&quot;
1193 1197
1194 #: properties.c:253 1198 #: properties.c:253
1195 msgid "Latest program message" 1199 msgid "Latest program message"
1196 -msgstr "" 1200 +msgstr "Última mensagem de programa"
1197 1201
1198 #: src/v3270ft/v3270ft.c:194 1202 #: src/v3270ft/v3270ft.c:194
1199 msgid "Load" 1203 msgid "Load"
@@ -1270,11 +1274,11 @@ msgstr &quot;Nenhuma transferência em andamento&quot; @@ -1270,11 +1274,11 @@ msgstr &quot;Nenhuma transferência em andamento&quot;
1270 1274
1271 #: properties.c:94 1275 #: properties.c:94
1272 msgid "Non zero if the host is AS400." 1276 msgid "Non zero if the host is AS400."
1273 -msgstr "" 1277 +msgstr "Diferente de zero se o host é AS400"
1274 1278
1275 #: properties.c:87 1279 #: properties.c:87
1276 msgid "Non zero if the host is TSO." 1280 msgid "Non zero if the host is TSO."
1277 -msgstr "" 1281 +msgstr "Diferente de zero se o host é TSO"
1278 1282
1279 #: colors.c:513 1283 #: colors.c:513
1280 msgid "Normal/Protected" 1284 msgid "Normal/Protected"
@@ -1340,6 +1344,10 @@ msgstr &quot;Outro (VM/CMS)&quot; @@ -1340,6 +1344,10 @@ msgstr &quot;Outro (VM/CMS)&quot;
1340 msgid "Out of memory" 1344 msgid "Out of memory"
1341 msgstr "Memória insuficiente" 1345 msgstr "Memória insuficiente"
1342 1346
  1347 +#: local/events.cc:71
  1348 +msgid "Out of memory in vasprintf"
  1349 +msgstr "Memória insuficiente em vasprintf"
  1350 +
1343 #: 80javasamples.xml:39 1351 #: 80javasamples.xml:39
1344 msgid "Output test" 1352 msgid "Output test"
1345 msgstr "Output test" 1353 msgstr "Output test"
@@ -1746,8 +1754,8 @@ msgstr &quot;Erro SSL&quot; @@ -1746,8 +1754,8 @@ msgstr &quot;Erro SSL&quot;
1746 msgid "SSL Read error" 1754 msgid "SSL Read error"
1747 msgstr "Erro de leitura SSL" 1755 msgstr "Erro de leitura SSL"
1748 1756
1749 -#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:197  
1750 -#: ssl/negotiate.c:212 1757 +#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:199
  1758 +#: ssl/negotiate.c:215
1751 msgid "SSL error" 1759 msgid "SSL error"
1752 msgstr "Erro SSL" 1760 msgstr "Erro SSL"
1753 1761
@@ -1806,7 +1814,7 @@ msgstr &quot;Guarda fila de transferência num arquivo XML externo&quot; @@ -1806,7 +1814,7 @@ msgstr &quot;Guarda fila de transferência num arquivo XML externo&quot;
1806 1814
1807 #: properties.c:239 1815 #: properties.c:239
1808 msgid "Screen buffer length in bytes" 1816 msgid "Screen buffer length in bytes"
1809 -msgstr "" 1817 +msgstr "Tamanho do buffer de tela em bytes"
1810 1818
1811 #: 00default.xml:111 1819 #: 00default.xml:111
1812 msgid "Screen size" 1820 msgid "Screen size"
@@ -1818,11 +1826,11 @@ msgstr &quot;Scripts&quot; @@ -1818,11 +1826,11 @@ msgstr &quot;Scripts&quot;
1818 1826
1819 #: ssl/linux/getcrl.c:267 1827 #: ssl/linux/getcrl.c:267
1820 msgid "Search did not produce any attributes." 1828 msgid "Search did not produce any attributes."
1821 -msgstr "" 1829 +msgstr "Pesquisa não produziu nenhum atributo"
1822 1830
1823 #: ssl/linux/getcrl.c:278 1831 #: ssl/linux/getcrl.c:278
1824 msgid "Search did not produce any values." 1832 msgid "Search did not produce any values."
1825 -msgstr "" 1833 +msgstr "Pesquisa não produziu nenhum valor"
1826 1834
1827 #: src/v3270ft/tables.c:183 1835 #: src/v3270ft/tables.c:183
1828 msgid "" 1836 msgid ""
@@ -2058,7 +2066,7 @@ msgstr &quot;Não é possível receber requisições no estado %04d&quot; @@ -2058,7 +2066,7 @@ msgstr &quot;Não é possível receber requisições no estado %04d&quot;
2058 2066
2059 #: properties.c:129 2067 #: properties.c:129
2060 msgid "State is 3270, TN3270e or SSCP" 2068 msgid "State is 3270, TN3270e or SSCP"
2061 -msgstr "" 2069 +msgstr "Estado do terminal é 3270, TN3270e or SSCP"
2062 2070
2063 #: src/v3270/security.c:247 2071 #: src/v3270/security.c:247
2064 msgid "Subject issuer mismatch" 2072 msgid "Subject issuer mismatch"
@@ -2090,7 +2098,7 @@ msgstr &quot;&quot; @@ -2090,7 +2098,7 @@ msgstr &quot;&quot;
2090 "has been reached, or the maximum number of data blocks per file (16060) has " 2098 "has been reached, or the maximum number of data blocks per file (16060) has "
2091 "been reached." 2099 "been reached."
2092 2100
2093 -#: ssl/negotiate.c:198 src/v3270/security.c:136 2101 +#: ssl/negotiate.c:200 src/v3270/security.c:136
2094 msgid "The CRL has expired." 2102 msgid "The CRL has expired."
2095 msgstr "A lista de certificados revogados expirou." 2103 msgstr "A lista de certificados revogados expirou."
2096 2104
@@ -2120,19 +2128,13 @@ msgstr &quot;&quot; @@ -2120,19 +2128,13 @@ msgstr &quot;&quot;
2120 "signature value could not be determined rather than it not matching the " 2128 "signature value could not be determined rather than it not matching the "
2121 "expected value. Unused." 2129 "expected value. Unused."
2122 2130
2123 -#: ssl/negotiate.c:199  
2124 -#, fuzzy 2131 +#: ssl/negotiate.c:201
2125 msgid "The Certificate revocation list (CRL) has expired." 2132 msgid "The Certificate revocation list (CRL) has expired."
2126 -msgstr ""  
2127 -"A lista de revogação de certificados (CRL) de um certificado não pôde ser "  
2128 -"encontrada." 2133 +msgstr "A lista de revogação de certificados (CRL) está expirada."
2129 2134
2130 #: ssl/negotiate.c:192 2135 #: ssl/negotiate.c:192
2131 -#, fuzzy  
2132 msgid "The Certificate revocation list (CRL) is not yet valid." 2136 msgid "The Certificate revocation list (CRL) is not yet valid."
2133 -msgstr ""  
2134 -"A lista de revogação de certificados (CRL) de um certificado não pôde ser "  
2135 -"encontrada." 2137 +msgstr "A lista de revogação de certificados (CRL) ainda não é válida."
2136 2138
2137 #: ssl/negotiate.c:183 2139 #: ssl/negotiate.c:183
2138 msgid "" 2140 msgid ""
@@ -2141,18 +2143,17 @@ msgstr &quot;&quot; @@ -2141,18 +2143,17 @@ msgstr &quot;&quot;
2141 "A lista de revogação de certificados (CRL) de um certificado não pôde ser " 2143 "A lista de revogação de certificados (CRL) de um certificado não pôde ser "
2142 "encontrada." 2144 "encontrada."
2143 2145
2144 -#: ssl/negotiate.c:213 2146 +#: ssl/negotiate.c:216
2145 msgid "The SSL certificate for this host is not trusted." 2147 msgid "The SSL certificate for this host is not trusted."
2146 msgstr "O certificado SSL deste servidor não é confiável" 2148 msgstr "O certificado SSL deste servidor não é confiável"
2147 2149
2148 #: ssl/linux/getcrl.c:107 2150 #: ssl/linux/getcrl.c:107
2149 msgid "The URL for the CRL is undefined or empty" 2151 msgid "The URL for the CRL is undefined or empty"
2150 -msgstr "" 2152 +msgstr "A URL para o CRL não está definida ou vazia"
2151 2153
2152 #: ssl/linux/getcrl.c:303 2154 #: ssl/linux/getcrl.c:303
2153 -#, fuzzy  
2154 msgid "The URL scheme is unknown" 2155 msgid "The URL scheme is unknown"
2155 -msgstr "Termo RPM %d não foi reconhecido" 2156 +msgstr "O tipo de URL é desconhecido"
2156 2157
2157 #: src/v3270/security.c:220 2158 #: src/v3270/security.c:220
2158 msgid "The basicConstraints pathlength parameter has been exceeded." 2159 msgid "The basicConstraints pathlength parameter has been exceeded."
@@ -2206,7 +2207,7 @@ msgstr &quot;&quot; @@ -2206,7 +2207,7 @@ msgstr &quot;&quot;
2206 2207
2207 #: properties.c:218 2208 #: properties.c:218
2208 msgid "The color type" 2209 msgid "The color type"
2209 -msgstr "" 2210 +msgstr "O tipo de cor"
2210 2211
2211 #: src/v3270/security.c:343 2212 #: src/v3270/security.c:343
2212 msgid "The connection is insecure" 2213 msgid "The connection is insecure"
@@ -2259,6 +2260,8 @@ msgstr &quot;&quot; @@ -2259,6 +2260,8 @@ msgstr &quot;&quot;
2259 #: properties.c:260 2260 #: properties.c:260
2260 msgid "The delay between the host unlocking the keyboard and the actual unlock" 2261 msgid "The delay between the host unlocking the keyboard and the actual unlock"
2261 msgstr "" 2262 msgstr ""
  2263 +"Intervalo de tempo entre o desbloqueio de teclado pelo host e o desbloqueio "
  2264 +"real"
2262 2265
2263 #: dialog.c:243 2266 #: dialog.c:243
2264 msgid "The file already exists. Replace it?" 2267 msgid "The file already exists. Replace it?"
@@ -2306,7 +2309,7 @@ msgstr &quot;Os tipos conhecidos são %s&quot; @@ -2306,7 +2309,7 @@ msgstr &quot;Os tipos conhecidos são %s&quot;
2306 2309
2307 #: properties.c:211 2310 #: properties.c:211
2308 msgid "The model number" 2311 msgid "The model number"
2309 -msgstr "" 2312 +msgstr "Nº do modelo"
2310 2313
2311 #: main.c:318 2314 #: main.c:318
2312 msgid "The model of 3270 display to be emulated" 2315 msgid "The model of 3270 display to be emulated"
@@ -2345,7 +2348,7 @@ msgstr &quot;&quot; @@ -2345,7 +2348,7 @@ msgstr &quot;&quot;
2345 "O Certificado raiz não está marcado como confiável para os fins " 2348 "O Certificado raiz não está marcado como confiável para os fins "
2346 "especificados." 2349 "especificados."
2347 2350
2348 -#: ssl/negotiate.c:214 2351 +#: ssl/negotiate.c:217
2349 msgid "" 2352 msgid ""
2350 "The security certificate presented by this host was not issued by a trusted " 2353 "The security certificate presented by this host was not issued by a trusted "
2351 "certificate authority." 2354 "certificate authority."
@@ -2435,9 +2438,8 @@ msgid &quot;Trace Data Stream&quot; @@ -2435,9 +2438,8 @@ msgid &quot;Trace Data Stream&quot;
2435 msgstr "Trace Data Stream" 2438 msgstr "Trace Data Stream"
2436 2439
2437 #: toggles.c:231 2440 #: toggles.c:231
2438 -#, fuzzy  
2439 msgid "Trace SSL negotiation" 2441 msgid "Trace SSL negotiation"
2440 -msgstr "Negociação SSL falhou" 2442 +msgstr "Trace da negociação SSL"
2441 2443
2442 #: toggles.c:123 2444 #: toggles.c:123
2443 msgid "Trace interface events" 2445 msgid "Trace interface events"
@@ -2499,9 +2501,9 @@ msgstr &quot;Tente de novo com o mesmo arquivo.&quot; @@ -2499,9 +2501,9 @@ msgstr &quot;Tente de novo com o mesmo arquivo.&quot;
2499 msgid "Turquoise" 2501 msgid "Turquoise"
2500 msgstr "Turquesa" 2502 msgstr "Turquesa"
2501 2503
2502 -#: properties.c:404 2504 +#: properties.c:403
2503 msgid "URL for the CRL file" 2505 msgid "URL for the CRL file"
2504 -msgstr "" 2506 +msgstr "URL para o arquivo CRL"
2505 2507
2506 #: dialog.c:64 2508 #: dialog.c:64
2507 msgid "UTF-8" 2509 msgid "UTF-8"
@@ -2589,9 +2591,8 @@ msgid &quot;Unexpected or invalid %s attribute: \&quot;%s\&quot;&quot; @@ -2589,9 +2591,8 @@ msgid &quot;Unexpected or invalid %s attribute: \&quot;%s\&quot;&quot;
2589 msgstr "Atributo %s inesperado ou inválido: \"%s\"" 2591 msgstr "Atributo %s inesperado ou inválido: \"%s\""
2590 2592
2591 #: ssl/linux/getcrl.c:302 2593 #: ssl/linux/getcrl.c:302
2592 -#, fuzzy  
2593 msgid "Unexpected or invalid CRL URL" 2594 msgid "Unexpected or invalid CRL URL"
2594 -msgstr "Valor de cor inválido ou inesperado: \"%s\"" 2595 +msgstr "URL do CRL é inesperada ou inválida"
2595 2596
2596 #: actions.c:486 2597 #: actions.c:486
2597 #, c-format 2598 #, c-format
@@ -2928,11 +2929,19 @@ msgstr &quot;um atributo \&quot;action\&quot;&quot; @@ -2928,11 +2929,19 @@ msgstr &quot;um atributo \&quot;action\&quot;&quot;
2928 msgid "bracket" 2929 msgid "bracket"
2929 msgstr "bracket" 2930 msgstr "bracket"
2930 2931
2931 -#: toggles.c:333 linux/connect.c:314 2932 +#: local/events.cc:163
  2933 +msgid "connected"
  2934 +msgstr "Conectado"
  2935 +
  2936 +#: toggles.c:333 linux/connect.c:317
2932 msgid "disable" 2937 msgid "disable"
2933 msgstr "desabilitar" 2938 msgstr "desabilitar"
2934 2939
2935 -#: toggles.c:333 linux/connect.c:314 2940 +#: local/events.cc:163
  2941 +msgid "disconnected"
  2942 +msgstr "Desconectado"
  2943 +
  2944 +#: toggles.c:333 linux/connect.c:317
2936 msgid "enable" 2945 msgid "enable"
2937 msgstr "habilitar" 2946 msgstr "habilitar"
2938 2947
@@ -2944,15 +2953,15 @@ msgstr &quot;erro fcntl() ao obter estado do socket.&quot; @@ -2944,15 +2953,15 @@ msgstr &quot;erro fcntl() ao obter estado do socket.&quot;
2944 msgid "ioctlsocket(FIONBIO) failed." 2953 msgid "ioctlsocket(FIONBIO) failed."
2945 msgstr "ioctlsocket(FIONBIO) failed." 2954 msgstr "ioctlsocket(FIONBIO) failed."
2946 2955
2947 -#: properties.c:397 2956 +#: properties.c:396
2948 msgid "lib3270 revision" 2957 msgid "lib3270 revision"
2949 -msgstr "" 2958 +msgstr "Revisão da lib3270"
2950 2959
2951 -#: properties.c:390 2960 +#: properties.c:389
2952 msgid "lib3270 version" 2961 msgid "lib3270 version"
2953 -msgstr "" 2962 +msgstr "Versão da lib3270"
2954 2963
2955 -#: linux/connect.c:303 2964 +#: linux/connect.c:304
2956 msgid "setsockopt(SO_OOBINLINE) has failed" 2965 msgid "setsockopt(SO_OOBINLINE) has failed"
2957 msgstr "setsockopt(SO_OOBINLINE) has failed" 2966 msgstr "setsockopt(SO_OOBINLINE) has failed"
2958 2967
locale/pw3270.pot
@@ -5,15 +5,15 @@ @@ -5,15 +5,15 @@
5 # 5 #
6 #: properties.c:66 properties.c:73 properties.c:80 properties.c:101 6 #: properties.c:66 properties.c:73 properties.c:80 properties.c:101
7 #: properties.c:108 properties.c:115 properties.c:122 properties.c:136 7 #: properties.c:108 properties.c:115 properties.c:122 properties.c:136
8 -#: properties.c:143 properties.c:348 properties.c:355 properties.c:362  
9 -#: properties.c:369 properties.c:376 properties.c:383 8 +#: properties.c:143 properties.c:347 properties.c:354 properties.c:361
  9 +#: properties.c:368 properties.c:375 properties.c:382
10 #, fuzzy 10 #, fuzzy
11 msgid "" 11 msgid ""
12 msgstr "" 12 msgstr ""
13 "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n" 13 "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n"
14 "Project-Id-Version: PACKAGE VERSION\n" 14 "Project-Id-Version: PACKAGE VERSION\n"
15 "Report-Msgid-Bugs-To: \n" 15 "Report-Msgid-Bugs-To: \n"
16 -"POT-Creation-Date: 2019-01-16 17:05-0200\n" 16 +"POT-Creation-Date: 2019-01-17 15:13-0200\n"
17 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 17 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
18 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 18 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
19 "Language-Team: LANGUAGE <LL@li.org>\n" 19 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -24,7 +24,7 @@ msgstr &quot;&quot; @@ -24,7 +24,7 @@ msgstr &quot;&quot;
24 "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n" 24 "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n"
25 "Project-Id-Version: PACKAGE VERSION\n" 25 "Project-Id-Version: PACKAGE VERSION\n"
26 "Report-Msgid-Bugs-To: \n" 26 "Report-Msgid-Bugs-To: \n"
27 -"POT-Creation-Date: 2019-01-16 17:05-0200\n" 27 +"POT-Creation-Date: 2019-01-17 15:55+0000\n"
28 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 28 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
29 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 29 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
30 "Language-Team: LANGUAGE <LL@li.org>\n" 30 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -35,7 +35,7 @@ msgstr &quot;&quot; @@ -35,7 +35,7 @@ msgstr &quot;&quot;
35 "#-#-#-#-# libv3270.pot (PACKAGE VERSION) #-#-#-#-#\n" 35 "#-#-#-#-# libv3270.pot (PACKAGE VERSION) #-#-#-#-#\n"
36 "Project-Id-Version: PACKAGE VERSION\n" 36 "Project-Id-Version: PACKAGE VERSION\n"
37 "Report-Msgid-Bugs-To: \n" 37 "Report-Msgid-Bugs-To: \n"
38 -"POT-Creation-Date: 2019-01-16 17:05-0200\n" 38 +"POT-Creation-Date: 2019-01-17 15:56+0000\n"
39 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 39 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
40 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 40 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
41 "Language-Team: LANGUAGE <LL@li.org>\n" 41 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -57,7 +57,7 @@ msgstr &quot;&quot; @@ -57,7 +57,7 @@ msgstr &quot;&quot;
57 "#-#-#-#-# dbus3270.pot (PACKAGE VERSION) #-#-#-#-#\n" 57 "#-#-#-#-# dbus3270.pot (PACKAGE VERSION) #-#-#-#-#\n"
58 "Project-Id-Version: PACKAGE VERSION\n" 58 "Project-Id-Version: PACKAGE VERSION\n"
59 "Report-Msgid-Bugs-To: \n" 59 "Report-Msgid-Bugs-To: \n"
60 -"POT-Creation-Date: 2019-01-16 17:05-0200\n" 60 +"POT-Creation-Date: 2019-01-17 15:13-0200\n"
61 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 61 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
62 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 62 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
63 "Language-Team: LANGUAGE <LL@li.org>\n" 63 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -426,7 +426,7 @@ msgstr &quot;&quot; @@ -426,7 +426,7 @@ msgstr &quot;&quot;
426 msgid "C_onnect" 426 msgid "C_onnect"
427 msgstr "" 427 msgstr ""
428 428
429 -#: toggles.c:333 linux/connect.c:314 429 +#: toggles.c:333 linux/connect.c:317
430 #, c-format 430 #, c-format
431 msgid "Can't %s network keep-alive" 431 msgid "Can't %s network keep-alive"
432 msgstr "" 432 msgstr ""
@@ -479,6 +479,10 @@ msgstr &quot;&quot; @@ -479,6 +479,10 @@ msgstr &quot;&quot;
479 msgid "Can't get file size" 479 msgid "Can't get file size"
480 msgstr "" 480 msgstr ""
481 481
  482 +#: local/session.cc:124 local/session.cc:142
  483 +msgid "Can't get screen contents"
  484 +msgstr ""
  485 +
482 #: ssl/linux/getcrl.c:208 486 #: ssl/linux/getcrl.c:208
483 msgid "Can't initialize LDAP" 487 msgid "Can't initialize LDAP"
484 msgstr "" 488 msgstr ""
@@ -713,7 +717,7 @@ msgstr &quot;&quot; @@ -713,7 +717,7 @@ msgstr &quot;&quot;
713 msgid "Connecting to host" 717 msgid "Connecting to host"
714 msgstr "" 718 msgstr ""
715 719
716 -#: iocalls.c:539 linux/connect.c:273 linux/connect.c:302 linux/connect.c:318 720 +#: iocalls.c:539 linux/connect.c:273 linux/connect.c:303 linux/connect.c:321
717 msgid "Connection error" 721 msgid "Connection error"
718 msgstr "" 722 msgstr ""
719 723
@@ -908,6 +912,10 @@ msgstr &quot;&quot; @@ -908,6 +912,10 @@ msgstr &quot;&quot;
908 msgid "Error \"%s\" writing to local file (rc=%d)" 912 msgid "Error \"%s\" writing to local file (rc=%d)"
909 msgstr "" 913 msgstr ""
910 914
  915 +#: local/events.cc:59
  916 +msgid "Error in vasprintf"
  917 +msgstr ""
  918 +
911 #: dialog.c:404 919 #: dialog.c:404
912 #, c-format 920 #, c-format
913 msgid "Error loading %s" 921 msgid "Error loading %s"
@@ -1125,7 +1133,7 @@ msgstr &quot;&quot; @@ -1125,7 +1133,7 @@ msgstr &quot;&quot;
1125 msgid "Invalid argument format" 1133 msgid "Invalid argument format"
1126 msgstr "" 1134 msgstr ""
1127 1135
1128 -#: src/v3270/widget.c:940 1136 +#: local/session.cc:69 src/v3270/widget.c:940
1129 msgid "Invalid callback table, possible version mismatch in lib3270" 1137 msgid "Invalid callback table, possible version mismatch in lib3270"
1130 msgstr "" 1138 msgstr ""
1131 1139
@@ -1145,6 +1153,10 @@ msgstr &quot;&quot; @@ -1145,6 +1153,10 @@ msgstr &quot;&quot;
1145 msgid "Invalid remap scope" 1153 msgid "Invalid remap scope"
1146 msgstr "" 1154 msgstr ""
1147 1155
  1156 +#: local/events.cc:88 local/events.cc:141
  1157 +msgid "Invalid session handler"
  1158 +msgstr ""
  1159 +
1148 #: properties.c:164 1160 #: properties.c:164
1149 msgid "Is starting (no first screen)?" 1161 msgid "Is starting (no first screen)?"
1150 msgstr "" 1162 msgstr ""
@@ -1320,6 +1332,10 @@ msgstr &quot;&quot; @@ -1320,6 +1332,10 @@ msgstr &quot;&quot;
1320 msgid "Out of memory" 1332 msgid "Out of memory"
1321 msgstr "" 1333 msgstr ""
1322 1334
  1335 +#: local/events.cc:71
  1336 +msgid "Out of memory in vasprintf"
  1337 +msgstr ""
  1338 +
1323 #: 80javasamples.xml:39 1339 #: 80javasamples.xml:39
1324 msgid "Output test" 1340 msgid "Output test"
1325 msgstr "" 1341 msgstr ""
@@ -1719,8 +1735,8 @@ msgstr &quot;&quot; @@ -1719,8 +1735,8 @@ msgstr &quot;&quot;
1719 msgid "SSL Read error" 1735 msgid "SSL Read error"
1720 msgstr "" 1736 msgstr ""
1721 1737
1722 -#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:197  
1723 -#: ssl/negotiate.c:212 1738 +#: ssl/negotiate.c:181 ssl/negotiate.c:190 ssl/negotiate.c:199
  1739 +#: ssl/negotiate.c:215
1724 msgid "SSL error" 1740 msgid "SSL error"
1725 msgstr "" 1741 msgstr ""
1726 1742
@@ -2047,7 +2063,7 @@ msgid &quot;&quot; @@ -2047,7 +2063,7 @@ msgid &quot;&quot;
2047 "been reached." 2063 "been reached."
2048 msgstr "" 2064 msgstr ""
2049 2065
2050 -#: ssl/negotiate.c:198 src/v3270/security.c:136 2066 +#: ssl/negotiate.c:200 src/v3270/security.c:136
2051 msgid "The CRL has expired." 2067 msgid "The CRL has expired."
2052 msgstr "" 2068 msgstr ""
2053 2069
@@ -2074,7 +2090,7 @@ msgid &quot;&quot; @@ -2074,7 +2090,7 @@ msgid &quot;&quot;
2074 "expected value. Unused." 2090 "expected value. Unused."
2075 msgstr "" 2091 msgstr ""
2076 2092
2077 -#: ssl/negotiate.c:199 2093 +#: ssl/negotiate.c:201
2078 msgid "The Certificate revocation list (CRL) has expired." 2094 msgid "The Certificate revocation list (CRL) has expired."
2079 msgstr "" 2095 msgstr ""
2080 2096
@@ -2087,7 +2103,7 @@ msgid &quot;&quot; @@ -2087,7 +2103,7 @@ msgid &quot;&quot;
2087 "The Certificate revocation list (CRL) of a certificate could not be found." 2103 "The Certificate revocation list (CRL) of a certificate could not be found."
2088 msgstr "" 2104 msgstr ""
2089 2105
2090 -#: ssl/negotiate.c:213 2106 +#: ssl/negotiate.c:216
2091 msgid "The SSL certificate for this host is not trusted." 2107 msgid "The SSL certificate for this host is not trusted."
2092 msgstr "" 2108 msgstr ""
2093 2109
@@ -2257,7 +2273,7 @@ msgstr &quot;&quot; @@ -2257,7 +2273,7 @@ msgstr &quot;&quot;
2257 msgid "The root CA is not marked as trusted for the specified purpose." 2273 msgid "The root CA is not marked as trusted for the specified purpose."
2258 msgstr "" 2274 msgstr ""
2259 2275
2260 -#: ssl/negotiate.c:214 2276 +#: ssl/negotiate.c:217
2261 msgid "" 2277 msgid ""
2262 "The security certificate presented by this host was not issued by a trusted " 2278 "The security certificate presented by this host was not issued by a trusted "
2263 "certificate authority." 2279 "certificate authority."
@@ -2394,7 +2410,7 @@ msgstr &quot;&quot; @@ -2394,7 +2410,7 @@ msgstr &quot;&quot;
2394 msgid "Turquoise" 2410 msgid "Turquoise"
2395 msgstr "" 2411 msgstr ""
2396 2412
2397 -#: properties.c:404 2413 +#: properties.c:403
2398 msgid "URL for the CRL file" 2414 msgid "URL for the CRL file"
2399 msgstr "" 2415 msgstr ""
2400 2416
@@ -2803,11 +2819,19 @@ msgstr &quot;&quot; @@ -2803,11 +2819,19 @@ msgstr &quot;&quot;
2803 msgid "bracket" 2819 msgid "bracket"
2804 msgstr "" 2820 msgstr ""
2805 2821
2806 -#: toggles.c:333 linux/connect.c:314 2822 +#: local/events.cc:163
  2823 +msgid "connected"
  2824 +msgstr ""
  2825 +
  2826 +#: toggles.c:333 linux/connect.c:317
2807 msgid "disable" 2827 msgid "disable"
2808 msgstr "" 2828 msgstr ""
2809 2829
2810 -#: toggles.c:333 linux/connect.c:314 2830 +#: local/events.cc:163
  2831 +msgid "disconnected"
  2832 +msgstr ""
  2833 +
  2834 +#: toggles.c:333 linux/connect.c:317
2811 msgid "enable" 2835 msgid "enable"
2812 msgstr "" 2836 msgstr ""
2813 2837
@@ -2819,15 +2843,15 @@ msgstr &quot;&quot; @@ -2819,15 +2843,15 @@ msgstr &quot;&quot;
2819 msgid "ioctlsocket(FIONBIO) failed." 2843 msgid "ioctlsocket(FIONBIO) failed."
2820 msgstr "" 2844 msgstr ""
2821 2845
2822 -#: properties.c:397 2846 +#: properties.c:396
2823 msgid "lib3270 revision" 2847 msgid "lib3270 revision"
2824 msgstr "" 2848 msgstr ""
2825 2849
2826 -#: properties.c:390 2850 +#: properties.c:389
2827 msgid "lib3270 version" 2851 msgid "lib3270 version"
2828 msgstr "" 2852 msgstr ""
2829 2853
2830 -#: linux/connect.c:303 2854 +#: linux/connect.c:304
2831 msgid "setsockopt(SO_OOBINLINE) has failed" 2855 msgid "setsockopt(SO_OOBINLINE) has failed"
2832 msgstr "" 2856 msgstr ""
2833 2857
src/pw3270/common/config.c
@@ -562,131 +562,81 @@ gchar * build_data_filename(const gchar *first_element, ...) @@ -562,131 +562,81 @@ gchar * build_data_filename(const gchar *first_element, ...)
562 562
563 gchar * filename_from_va(const gchar *first_element, va_list args) 563 gchar * filename_from_va(const gchar *first_element, va_list args)
564 { 564 {
565 - static const gchar * datadir = NULL;  
566 - const gchar * appname[] = { g_get_application_name(), PACKAGE_NAME };  
567 - GString * result = NULL;  
568 - const gchar * element; 565 + const gchar * appname[] = { g_get_application_name(), PACKAGE_NAME };
  566 + size_t p,f;
569 567
570 - if(datadir)  
571 - result = g_string_new(datadir); 568 + // Make base path
  569 + const gchar *element;
  570 + GString * result = g_string_new("");
  571 + for(element = first_element;element;element = va_arg(args, gchar *))
  572 + {
  573 + g_string_append_c(result,G_DIR_SEPARATOR);
  574 + g_string_append(result,element);
  575 + }
572 576
573 -#if defined( HAVE_WIN_REGISTRY ) 577 + g_autofree gchar * suffix = g_string_free(result, FALSE);
574 578
575 - if(!result) 579 +#if defined( HAVE_WIN_REGISTRY )
  580 + for(p=0;p<G_N_ELEMENTS(appname) && !result;p++)
576 { 581 {
577 - // No predefined datadir, search registry  
578 - int p;  
579 -  
580 - for(p=0;p<G_N_ELEMENTS(appname) && !result;p++)  
581 - {  
582 - gchar * path = g_strconcat("Software\\",appname[p],NULL);  
583 - HKEY hKey = 0;  
584 - LONG rc = 0; 582 + g_autofree gchar * path = g_strconcat("Software\\",appname[p],NULL);
585 583
586 - // Note: This could be needed: http://support.microsoft.com/kb/556009  
587 - // http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129(v=vs.85).aspx 584 + HKEY hKey = 0;
  585 + LONG rc = 0;
588 586
589 - rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE,path,0,KEY_QUERY_VALUE,&hKey);  
590 - SetLastError(rc);  
591 -  
592 - if(rc == ERROR_SUCCESS)  
593 - {  
594 - char data[4096];  
595 - unsigned long datalen = sizeof(data); // data field length(in), data returned length(out)  
596 - unsigned long datatype; // #defined in winnt.h (predefined types 0-11)  
597 -  
598 - rc = RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) data,&datalen);  
599 - if(rc == ERROR_SUCCESS)  
600 - {  
601 - result = g_string_new(g_strchomp(data));  
602 - }  
603 - else  
604 - {  
605 - gchar *msg = g_win32_error_message(rc);  
606 -#ifndef DEBUG  
607 - g_message("Error \"%s\" when getting application datadir from registry",msg);  
608 -#endif // !DEBUG  
609 - g_free(msg);  
610 - }  
611 - RegCloseKey(hKey);  
612 - }  
613 - else  
614 - {  
615 - gchar *msg = g_win32_error_message(rc);  
616 -#ifndef DEBUG  
617 - g_message("Error \"%s\" when opening datadir key from registry",msg);  
618 -#endif // !DEBUG  
619 - g_free(msg);  
620 - }  
621 -  
622 - g_free(path);  
623 - }  
624 - }  
625 -#endif // HAVE_WIN_REGISTRY 587 + // Note: This could be needed: http://support.microsoft.com/kb/556009
  588 + // http://msdn.microsoft.com/en-us/library/windows/desktop/aa384129(v=vs.85).aspx
626 589
627 - if(!result)  
628 - {  
629 - // Search for application folder on system data dirs  
630 - const gchar * const * dir = g_get_system_data_dirs();  
631 - int p; 590 + rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE,path,0,KEY_QUERY_VALUE,&hKey);
  591 + SetLastError(rc);
632 592
633 - for(p=0;p<G_N_ELEMENTS(appname) && !datadir;p++) 593 + if(rc == ERROR_SUCCESS)
634 { 594 {
635 - int f; 595 + char data[4096];
  596 + unsigned long datalen = sizeof(data); // data field length(in), data returned length(out)
  597 + unsigned long datatype; // #defined in winnt.h (predefined types 0-11)
636 598
637 - for(f=0;dir[f] && !datadir;f++) 599 + rc = RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) data,&datalen);
  600 + if(rc == ERROR_SUCCESS)
638 { 601 {
639 - gchar *name = g_build_filename(dir[f],appname[p],NULL);  
640 -// trace("Searching for %s: %s",name,g_file_test(name,G_FILE_TEST_IS_DIR) ? "Ok" : "Not found");  
641 - if(g_file_test(name,G_FILE_TEST_IS_DIR))  
642 - result = g_string_new(datadir = name);  
643 - else  
644 - g_free(name); 602 + gchar * path = g_build_filename(data,appname[p],suffix,NULL);
  603 + trace("searching \"%s\"",path);
  604 + if(g_file_test(path,G_FILE_TEST_EXISTS))
  605 + return path;
  606 + g_free(path);
645 } 607 }
  608 + RegCloseKey(hKey);
646 } 609 }
647 610
648 } 611 }
  612 +#endif // HAVE_WIN_REGISTRY
649 613
650 -#ifdef DEBUG  
651 - if(!result) 614 + // Check system data dirs
  615 + const gchar * const * system_data_dirs = g_get_system_data_dirs();
  616 + for(p=0;p<G_N_ELEMENTS(appname);p++)
652 { 617 {
653 - int f;  
654 - gchar *dir = g_get_current_dir();  
655 -  
656 - for(f=0;f<2 && dir;f++) 618 + for(f=0;system_data_dirs[f];f++)
657 { 619 {
658 - gchar *ptr = dir;  
659 - dir = g_path_get_dirname(ptr);  
660 - g_free(ptr);  
661 - }  
662 -  
663 - if(dir)  
664 - {  
665 - gchar *name = g_build_filename(dir,"ui",NULL);  
666 - if(g_file_test(name,G_FILE_TEST_IS_DIR))  
667 - result = g_string_new(dir);  
668 - g_free(name);  
669 - g_free(dir); 620 + gchar * path = g_build_filename(system_data_dirs[f],appname[p],suffix,NULL);
  621 + trace("searching \"%s\"",path);
  622 + if(g_file_test(path,G_FILE_TEST_EXISTS))
  623 + return path;
  624 + g_free(path);
670 } 625 }
671 626
672 } 627 }
673 -#endif // DEBUG  
674 628
675 - if(!result)  
676 - {  
677 - gchar *dir = g_get_current_dir();  
678 - result = g_string_new(dir);  
679 - g_free(dir);  
680 - g_warning("Unable to find application datadir, using %s",result->str);  
681 - } 629 + // Check current dir
  630 + g_autofree gchar *dir = g_get_current_dir();
  631 + gchar * path = g_build_filename(dir,suffix,NULL);
  632 + trace("searching \"%s\"",path);
  633 + if(g_file_test(path,G_FILE_TEST_EXISTS))
  634 + return path;
  635 + g_free(path);
682 636
683 - for(element = first_element;element;element = va_arg(args, gchar *))  
684 - {  
685 - g_string_append_c(result,G_DIR_SEPARATOR);  
686 - g_string_append(result,element);  
687 - } 637 + trace("Can't find \"%s\"",suffix);
688 638
689 - return g_string_free(result, FALSE); 639 + return g_build_filename(".",suffix);
690 } 640 }
691 641
692 #ifdef HAVE_WIN_REGISTRY 642 #ifdef HAVE_WIN_REGISTRY