Skip to content

Commit

Permalink
Translate file reference/fileinfo/functions/finfo-file.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Adiel Cristo committed Aug 24, 2023
1 parent cbbb12e commit f4f6944
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 10 deletions.
2 changes: 1 addition & 1 deletion reference/fileinfo/finfo/buffer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::buffer</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam>

This comment has been minimized.

Copy link
@alfsb

alfsb Aug 24, 2023

Member

Nomes de parâmetros não devem ser traduzidos, por conta de: https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments

Alguém que ler o manual pode tentar chamar funções ou métodos com parâmetros nomeados traduzidos e vai resultar em erro.

This comment has been minimized.

Copy link
@adielcristo

adielcristo Aug 24, 2023

Member

@alfsb Opa, valeu. Me passei nisso. Revertido.

</methodsynopsis>
<para>
&info.function.alias; <link linkend="function.finfo-buffer">finfo_buffer()</link>
Expand Down
5 changes: 3 additions & 2 deletions reference/fileinfo/finfo/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<constructorsynopsis role="finfo">
<modifier>public</modifier> <methodname>finfo::__construct</methodname>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>magic_database</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>banco_de_dados_magico</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
<para>
&info.function.alias; <function>finfo_open</function>
Expand All @@ -33,7 +33,8 @@
<row>
<entry>8.0.3</entry>
<entry>
O parâmetro <parameter>magic_database</parameter> agora pode ser nulo.
O parâmetro <parameter>banco_de_dados_magico</parameter> agora pode ser
nulo.
</entry>
</row>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions reference/fileinfo/finfo/file.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
&reftitle.description;
<methodsynopsis role="finfo">
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>string</type><parameter>nome_do_arquivo</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
&info.function.alias; <link linkend="function.finfo-file">finfo_file()</link>
Expand Down
10 changes: 5 additions & 5 deletions reference/fileinfo/functions/finfo-buffer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<methodparam><type>finfo</type><parameter>finfo</parameter></methodparam>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>&style.oop;</para>
<methodsynopsis role="finfo">
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::buffer</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>

<para>
Expand All @@ -45,7 +45,7 @@
<term><parameter>string</parameter></term>
<listitem>
<para>
Conteúdo de um arquivo a ser verificado.
Conteúdo do arquivo a ser verificado.
</para>
</listitem>
</varlistentry>
Expand All @@ -59,7 +59,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>context</parameter></term>
<term><parameter>contexto</parameter></term>
<listitem>
<para>
</para>
Expand Down Expand Up @@ -91,7 +91,7 @@
<row>
<entry>8.0.0</entry>
<entry>
<parameter>context</parameter> agora pode ser nulo.
O parâmetro <parameter>contexto</parameter> agora pode ser nulo.
</entry>
</row>
</tbody>
Expand Down
160 changes: 160 additions & 0 deletions reference/fileinfo/functions/finfo-file.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 811ee28918e320b3f2d9324ef0f9feae816091b5 Maintainer: adiel Status: ready -->

<refentry xml:id="function.finfo-file" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>finfo_file</refname>
<refname>finfo::file</refname>
<refpurpose>Retorna informações sobre um arquivo</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>&style.procedural;</para>
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>finfo_file</methodname>
<methodparam><type>finfo</type><parameter>finfo</parameter></methodparam>
<methodparam><type>string</type><parameter>nome_do_arquivo</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>&style.oop;</para>
<methodsynopsis role="finfo">
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>finfo::file</methodname>
<methodparam><type>string</type><parameter>nome_do_arquivo</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer><constant>FILEINFO_NONE</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>contexto</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>

<para>
Esta função é usada para obter informações sobre um arquivo.
</para>

</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>finfo</parameter></term>
<listitem>
&fileinfo.parameters.finfo;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>nome_do_arquivo</parameter></term>
<listitem>
<para>
Nome do arquivo a ser verificado.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
Uma ou disjunção de mais
<link linkend="fileinfo.constants">constantes Fileinfo</link>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>contexto</parameter></term>
<listitem>
<para>
Para uma descrição de <literal>contextos</literal>, consulte <xref linkend="ref.stream"/>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna uma descrição textual do conteúdo do argumento
<parameter>nome_do_arquivo</parameter> ou &false; em caso de erro.
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&fileinfo.changelog.finfo-object;
<row>
<entry>8.0.0</entry>
<entry>
O parâmetro <parameter>contexto</parameter> agora pode ser nulo.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Exemplo de <function>finfo_file</function></title>
<programlisting role="php">
<![CDATA[
<?php
// retorna o tipo MIME, também conhecido como extensão mimetype
$finfo = finfo_open(FILEINFO_MIME_TYPE);
foreach (glob("*") as $nome_do_arquivo) {
echo finfo_file($finfo, $nome_do_arquivo) . "\n";
}
finfo_close($finfo);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
text/html
image/gif
application/vnd.ms-excel
]]>
</screen>
</example>
</para>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>finfo_buffer</function></member>
</simplelist>
</para>
</refsect1>

</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

0 comments on commit f4f6944

Please sign in to comment.