Units
Translation components API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/translations/documentation/articlesrc-scripting_index/pt/units/?format=api&page=5
https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/units/?format=api&page=4", "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "case $0 in <.>\n/etc/rc*)\n\t# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),\n\t# so get the name of the script from $_file\n\tname=$_file\n\t;;\n*)\n\tname=$0\n\t;;\nesac\n" ], "previous_source": "", "target": [ "" ], "id_hash": -2813600640925835384, "content_hash": -2813600640925835384, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:954", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 197, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 29, "source_unit": "https://translate-dev.freebsd.org/api/units/1710599/?format=api", "priority": 100, "id": 1711087, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=58f4151fc9cddf88", "url": "https://translate-dev.freebsd.org/api/units/1711087/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.465096Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "name=${name##*/} <.>\nrcvar=\"${name}_enable\" <.>\ndesc=\"Short description of this service\"\ncommand=\"/usr/local/sbin/dummy\"\n" ], "previous_source": "", "target": [ "" ], "id_hash": 4914643561584385006, "content_hash": 4914643561584385006, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:959", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 198, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/1710601/?format=api", "priority": 100, "id": 1711088, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=c4345247c5e5dbee", "url": "https://translate-dev.freebsd.org/api/units/1711088/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.465755Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "load_rc_config \"$name\"\n" ], "previous_source": "", "target": [ "" ], "id_hash": -9188714982607769889, "content_hash": -9188714982607769889, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:961", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 199, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1710603/?format=api", "priority": 100, "id": 1711089, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=007b20683f5aaedf", "url": "https://translate-dev.freebsd.org/api/units/1711089/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.466439Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "eval \"${rcvar}=\\${${rcvar}:-'NO'}\" <.>\neval \"${name}_svcj_options=\\${${name}_svcj_options:-'net_basic'}\" <.>\neval \"_dummy_user=\\${${name}_user:-'www'}\" <.>\n" ], "previous_source": "", "target": [ "" ], "id_hash": -2777507815346309763, "content_hash": -2777507815346309763, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:965", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 200, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 9, "source_unit": "https://translate-dev.freebsd.org/api/units/1710605/?format=api", "priority": 100, "id": 1711090, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=59744f5b9969757d", "url": "https://translate-dev.freebsd.org/api/units/1711090/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.467311Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "_dummy_configname=/usr/local/etc/${name}.cfg <.>\npidfile=/var/run/dummy/${name}.pid\nrequired_files ${_dummy_configname}\ncommand_args=\"-u ${_dummy_user} -c ${_dummy_configfile} -p ${pidfile}\"\n" ], "previous_source": "", "target": [ "" ], "id_hash": 903107542115020712, "content_hash": 903107542115020712, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:970", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 201, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/1710607/?format=api", "priority": 100, "id": 1711091, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=8c887b8651bdefa8", "url": "https://translate-dev.freebsd.org/api/units/1711091/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.468248Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "➊ and ➋ make sure to set the name variable to the man:basename[1] of the script name. If the filename is [.filename]#/usr/local/etc/rc.d/dummy#, name is set to [.filename]#dummy#. This way changing the filename of the rc script changes automatically the content of the name variable." ], "previous_source": "", "target": [ "" ], "id_hash": -9012410789457822966, "content_hash": -9012410789457822966, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:978", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 202, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 44, "source_unit": "https://translate-dev.freebsd.org/api/units/1710609/?format=api", "priority": 100, "id": 1711092, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=02ed7c230477fb0a", "url": "https://translate-dev.freebsd.org/api/units/1711092/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.469125Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "➌ specifies the variable name which is used in [.filename]#rc.conf# to enable this service based upon the filename of this script. In this example this resolves to dummy_enable." ], "previous_source": "", "target": [ "" ], "id_hash": -7519661370236562623, "content_hash": -7519661370236562623, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:981", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 203, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 28, "source_unit": "https://translate-dev.freebsd.org/api/units/1710611/?format=api", "priority": 100, "id": 1711093, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=17a4cbd31bd29341", "url": "https://translate-dev.freebsd.org/api/units/1711093/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.470035Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "➍ makes sure the default for the _enable variable is NO." ], "previous_source": "", "target": [ "" ], "id_hash": -824693361161876958, "content_hash": -824693361161876958, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:983", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 204, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 11, "source_unit": "https://translate-dev.freebsd.org/api/units/1710613/?format=api", "priority": 100, "id": 1711094, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=748e19c1e752ca22", "url": "https://translate-dev.freebsd.org/api/units/1711094/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.470888Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "➎ is an example of having some defaults for service specific framework variables, in this case the service jails options." ], "previous_source": "", "target": [ "" ], "id_hash": 3915909658951527922, "content_hash": 3915909658951527922, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:986", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 205, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 20, "source_unit": "https://translate-dev.freebsd.org/api/units/1710615/?format=api", "priority": 100, "id": 1711095, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=b6581b166253adf2", "url": "https://translate-dev.freebsd.org/api/units/1711095/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.471606Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "➏ and ➐ set variables internal to the script (pay attention to the underscore in front of _dummy_user to make it different from dummy_user which can be set in [.filename]#rc.conf#)." ], "previous_source": "", "target": [ "" ], "id_hash": 6837917759081032993, "content_hash": 6837917759081032993, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:988", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 206, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 30, "source_unit": "https://translate-dev.freebsd.org/api/units/1710617/?format=api", "priority": 100, "id": 1711096, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=dee529f9195c2d21", "url": "https://translate-dev.freebsd.org/api/units/1711096/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.472292Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "The part in ➎ is for variables which are not used inside the script itself but in the rc framework. All the variables which are used as parameters somewhere in the script are assigned to a generic variable like in ➐ to make it more easy to reference them (no need to eval them at each place of use)." ], "previous_source": "", "target": [ "" ], "id_hash": 8548359426061374120, "content_hash": 8548359426061374120, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:991", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 207, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 59, "source_unit": "https://translate-dev.freebsd.org/api/units/1710619/?format=api", "priority": 100, "id": 1711097, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=f6a1df9b5ac012a8", "url": "https://translate-dev.freebsd.org/api/units/1711097/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.473048Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "This script will now behave differently if the start script has a different name. This allows to create symlinks to it:" ], "previous_source": "", "target": [ "" ], "id_hash": -1576830812855665, "content_hash": -1576830812855665, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:994", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 208, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 21, "source_unit": "https://translate-dev.freebsd.org/api/units/1710621/?format=api", "priority": 100, "id": 1711098, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=7ffa65e17787628f", "url": "https://translate-dev.freebsd.org/api/units/1711098/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.473779Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "# ln -s dummy /usr/local/etc/rc.d/dummy_foo\n# sysrc dummy_foo_enable=YES\n# service dummy_foo start\n" ], "previous_source": "", "target": [ "" ], "id_hash": -5720235242663268993, "content_hash": -5720235242663268993, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:1000", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 209, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/1710623/?format=api", "priority": 100, "id": 1711099, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=309da45a9962ad7f", "url": "https://translate-dev.freebsd.org/api/units/1711099/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.474530Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "The above creates an instance of the dummy service with the name dummy_foo. It does not use the config file [.filename]#/usr/local/etc/dummy.cfg# but the config file [.filename]#/usr/local/etc/dummy_foo.cfg# (➐), and it uses the PID file [.filename]#/var/run/dummy/dummy_foo.pid# instead of [.filename]#/var/run/dummy/dummy.pid#." ], "previous_source": "", "target": [ "" ], "id_hash": 7286371940315760053, "content_hash": 7286371940315760053, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:1005", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 210, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 37, "source_unit": "https://translate-dev.freebsd.org/api/units/1710625/?format=api", "priority": 100, "id": 1711100, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=e51e64acc3e505b5", "url": "https://translate-dev.freebsd.org/api/units/1711100/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.475227Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/articlesrc-scripting_index/pt/?format=api", "source": [ "The services dummy and dummy_foo can be managed independently of each other, while having the start script update itself on package update (due to the symlink). This does not update the REQUIRE line, as such there is no easy way of depending on a specific instance. To depend upon a specific instance in the startup order a copy needs to be made instead of using a symlink. This prevents the automatic pick-up of changes to the start script when an update is installed." ], "previous_source": "", "target": [ "" ], "id_hash": 9107905419465069208, "content_hash": 9107905419465069208, "location": "documentation/content/en/articles/rc-scripting/_index.adoc:1012", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 211, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 83, "source_unit": "https://translate-dev.freebsd.org/api/units/1710627/?format=api", "priority": 100, "id": 1711101, "web_url": "https://translate-dev.freebsd.org/translate/documentation/articlesrc-scripting_index/pt/?checksum=fe65c7b927121298", "url": "https://translate-dev.freebsd.org/api/units/1711101/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2024-09-14T20:31:22.475936Z" } ] }{ "count": 215, "next": null, "previous": "