aboutsummaryrefslogtreecommitdiffstats
path: root/lib/l10n/pt_BR.js
diff options
context:
space:
mode:
authorNextcloud bot <bot@nextcloud.com>2024-07-26 00:20:10 +0000
committerNextcloud bot <bot@nextcloud.com>2024-07-26 00:20:10 +0000
commit70839355c8aaf293f6b9ee5242e4546a9e971899 (patch)
tree1819b1b52c9bf6036b2a1297987bd254cb347301 /lib/l10n/pt_BR.js
parent109bcfd389388fd23d9c75401eeef10abbcc4487 (diff)
downloadnextcloud-server-70839355c8aaf293f6b9ee5242e4546a9e971899.tar.gz
nextcloud-server-70839355c8aaf293f6b9ee5242e4546a9e971899.zip
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Diffstat (limited to 'lib/l10n/pt_BR.js')
-rw-r--r--lib/l10n/pt_BR.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js
index 5edc4c57c84..77971fe196d 100644
--- a/lib/l10n/pt_BR.js
+++ b/lib/l10n/pt_BR.js
@@ -296,7 +296,6 @@ OC.L10N.register(
"Output images" : "Imagens de saída",
"The generated images" : "As imagens geradas",
"Free text to text prompt" : "Texto livre para prompt de texto",
- "Runs an arbitrary prompt through a language model that retuns a reply" : "Executa um prompt arbitrário através de um modelo de linguagem que retorna uma resposta",
"Describe a task that you want the assistant to do or ask a question" : "Descreva uma tarefa que você deseja que o assistente execute ou faça uma pergunta",
"Generated reply" : "Resposta gerada",
"The generated text from the assistant" : "O texto gerado do assistente",
@@ -339,6 +338,9 @@ OC.L10N.register(
"The original text to extract topics from" : "O texto original para extrair tópicos de",
"Topics" : "Tópicos",
"The list of extracted topics" : "A lista de tópicos extraídos",
+ "Translate" : "Traduzir",
+ "Target language" : "Target language",
+ "Result" : "Resultado",
"Free prompt" : "Solicitação gratuita",
"Runs an arbitrary prompt through the language model." : "Executa um prompt arbitrário por meio do modelo de idioma.",
"Generate headline" : "Gerar título",
highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/**
 * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @author John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @license AGPL-3.0-or-later
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

import { parseXML, prepareFileFromProps } from 'webdav/dist/node/tools/dav'
import { processResponsePayload } from 'webdav/dist/node/response'
import client from './DavClient'

export const DEFAULT_LIMIT = 20
/**
 * Retrieve the comments list
 *
 * @param {object} data destructuring object
 * @param {string} data.commentsType the ressource type
 * @param {number} data.ressourceId the ressource ID
 * @param {object} [options] optional options for axios
 * @return {object[]} the comments list
 */
export default async function({ commentsType, ressourceId }, options = {}) {
	let response = null
	const ressourcePath = ['', commentsType, ressourceId].join('/')

	return await client.customRequest(ressourcePath, Object.assign({
		method: 'REPORT',
		data: `<?xml version="1.0"?>
			<oc:filter-comments
				xmlns:d="DAV:"
				xmlns:oc="http://owncloud.org/ns"
				xmlns:nc="http://nextcloud.org/ns"
				xmlns:ocs="http://open-collaboration-services.org/ns">
				<oc:limit>${DEFAULT_LIMIT}</oc:limit>
				<oc:offset>${options.offset || 0}</oc:offset>
			</oc:filter-comments>`,
	}, options))
		// See example on how it's done normally
		// https://github.com/perry-mitchell/webdav-client/blob/9de2da4a2599e06bd86c2778145b7ade39fe0b3c/source/interface/stat.js#L19
		// Waiting for proper REPORT integration https://github.com/perry-mitchell/webdav-client/issues/207
		.then(res => {
			response = res
			return res.data
		})
		.then(parseXML)
		.then(xml => processMultistatus(xml, true))
		.then(comments => processResponsePayload(response, comments, true))
		.then(response => response.data)
}

// https://github.com/perry-mitchell/webdav-client/blob/9de2da4a2599e06bd86c2778145b7ade39fe0b3c/source/interface/directoryContents.js#L32
/**
 * @param {any} result -
 * @param {any} isDetailed -
 */
function processMultistatus(result, isDetailed = false) {
	// Extract the response items (directory contents)
	const {
		multistatus: { response: responseItems },
	} = result
	return responseItems.map(item => {
		// Each item should contain a stat object
		const {
			propstat: { prop: props },
		} = item
		// Decode HTML entities
		const decodedProps = {
			...props,
			// Decode twice to handle potentially double-encoded entities
			// FIXME Remove this once https://github.com/nextcloud/server/issues/29306 is resolved
			actorDisplayName: decodeHtmlEntities(props.actorDisplayName, 2),
			message: decodeHtmlEntities(props.message, 2),
		}
		return prepareFileFromProps(decodedProps, decodedProps.id.toString(), isDetailed)
	})
}

/**
 * @param {any} value -
 * @param {any} passes -
 */
function decodeHtmlEntities(value, passes = 1) {
	const parser = new DOMParser()
	let decoded = value
	for (let i = 0; i < passes; i++) {
		decoded = parser.parseFromString(decoded, 'text/html').documentElement.textContent
	}
	return decoded
}