Skip to content

Commit 9533bdc

Browse files
elmoallistairoonid
andauthored
Menerjemahkan c-api (#19)
* Menerjemahkan c-api c-api--file, c-api--float, c-api--function Co-authored-by: oon arfiandwi <oon.arfiandwi@gmail.com>
1 parent ca7db47 commit 9533bdc

File tree

4 files changed

+357
-233
lines changed

4 files changed

+357
-233
lines changed

c-api/file.po

Lines changed: 92 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,117 +2,168 @@
22
# Copyright (C) 2001-2020, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5-
#
6-
#, fuzzy
5+
#
6+
# Translators:
7+
# Elmo Allistair, 2021
8+
#
79
msgid ""
810
msgstr ""
911
"Project-Id-Version: Python 3.9\n"
1012
"Report-Msgid-Bugs-To: \n"
1113
"POT-Creation-Date: 2020-10-21 04:23+0000\n"
12-
"PO-Revision-Date: 2017-02-16 17:35+0000\n"
14+
"PO-Revision-Date: 2021-04-02 20:35+0700\n"
15+
"Last-Translator: Elmo Allistair, 2021\n"
1316
"Language-Team: Indonesian (https://www.transifex.com/python-doc/teams/5390/id/)\n"
1417
"MIME-Version: 1.0\n"
1518
"Content-Type: text/plain; charset=UTF-8\n"
1619
"Content-Transfer-Encoding: 8bit\n"
1720
"Language: id\n"
1821
"Plural-Forms: nplurals=1; plural=0;\n"
22+
"Last-Translator: \n"
23+
"X-Generator: Poedit 2.2\n"
1924

2025
#: ../../c-api/file.rst:6
2126
msgid "File Objects"
22-
msgstr ""
27+
msgstr "Objek File"
2328

2429
#: ../../c-api/file.rst:10
2530
msgid ""
2631
"These APIs are a minimal emulation of the Python 2 C API for built-in file "
2732
"objects, which used to rely on the buffered I/O (:c:type:`FILE*`) support "
28-
"from the C standard library. In Python 3, files and streams use the new "
29-
":mod:`io` module, which defines several layers over the low-level unbuffered"
30-
" I/O of the operating system. The functions described below are convenience"
31-
" C wrappers over these new APIs, and meant mostly for internal error "
32-
"reporting in the interpreter; third-party code is advised to access the "
33-
":mod:`io` APIs instead."
34-
msgstr ""
33+
"from the C standard library. In Python 3, files and streams use the new :"
34+
"mod:`io` module, which defines several layers over the low-level unbuffered "
35+
"I/O of the operating system. The functions described below are convenience "
36+
"C wrappers over these new APIs, and meant mostly for internal error "
37+
"reporting in the interpreter; third-party code is advised to access the :"
38+
"mod:`io` APIs instead."
39+
msgstr ""
40+
"API ini adalah emulasi minimal Python 2 C API untuk objek file bawaan, yang "
41+
"biasanya mengandalkan dukungan I/O (:c:type:`FILE*`) yang di-buffer dari "
42+
"pustaka standar C. Dalam Python 3, file dan aliran menggunakan modul baru :"
43+
"mod:`io`, yang mendefinisikan beberapa lapisan di atas I/O tanpa buffer "
44+
"dari sistem operasi tingkat rendah . Fungsi yang dijelaskan di bawah ini "
45+
"adalah pembungkus kenyamanan C atas API baru ini, dan sebagian besar "
46+
"dimaksudkan untuk pelaporan kesalahan internal di interpreter; kode pihak "
47+
"ketiga disarankan untuk mengakses :mod:`io` APIs sebagai gantinya."
3548

3649
#: ../../c-api/file.rst:22
3750
msgid ""
3851
"Create a Python file object from the file descriptor of an already opened "
3952
"file *fd*. The arguments *name*, *encoding*, *errors* and *newline* can be "
4053
"``NULL`` to use the defaults; *buffering* can be *-1* to use the default. "
4154
"*name* is ignored and kept for backward compatibility. Return ``NULL`` on "
42-
"failure. For a more comprehensive description of the arguments, please refer"
43-
" to the :func:`io.open` function documentation."
55+
"failure. For a more comprehensive description of the arguments, please "
56+
"refer to the :func:`io.open` function documentation."
4457
msgstr ""
58+
"Membuat objek file Python dari deskriptor file dari file yang sudah dibuka "
59+
"*fd*. Argumen *name*, *encoding*, *errors* dan * newline* bisa ``NULL`` "
60+
"untuk menggunakan nilai default; *buffering* bisa *-1* untuk menggunakan "
61+
"default. *name* diabaikan dan disimpan untuk kompatibilitas ke belakang. "
62+
"Mengembalikan ``NULL`` jika gagal. Untuk penjelasan yang lebih lengkap "
63+
"tentang argumen, silakan merujuk ke dokumentasi fungsi :func:`io.open`."
4564

4665
#: ../../c-api/file.rst:31
4766
msgid ""
4867
"Since Python streams have their own buffering layer, mixing them with OS-"
4968
"level file descriptors can produce various issues (such as unexpected "
5069
"ordering of data)."
5170
msgstr ""
71+
"Karena aliran Python memiliki lapisan penyangga sendiri, mencampurnya "
72+
"dengan deskriptor file tingkat OS dapat menghasilkan berbagai masalah "
73+
"(seperti pengurutan data yang tidak terduga)."
5274

5375
#: ../../c-api/file.rst:35
5476
msgid "Ignore *name* attribute."
55-
msgstr ""
77+
msgstr "Abaikan atribut *name*."
5678

5779
#: ../../c-api/file.rst:41
5880
msgid ""
5981
"Return the file descriptor associated with *p* as an :c:type:`int`. If the "
60-
"object is an integer, its value is returned. If not, the object's "
61-
":meth:`~io.IOBase.fileno` method is called if it exists; the method must "
62-
"return an integer, which is returned as the file descriptor value. Sets an "
82+
"object is an integer, its value is returned. If not, the object's :meth:"
83+
"`~io.IOBase.fileno` method is called if it exists; the method must return "
84+
"an integer, which is returned as the file descriptor value. Sets an "
6385
"exception and returns ``-1`` on failure."
6486
msgstr ""
87+
"Mengembalikan deskriptor file yang terkait dengan *p* sebagai :c:type:"
88+
"`int`. Jika objek adalah bilangan bulat, nilainya dikembalikan. Jika tidak, "
89+
"metode objek :meth:`~io.IOBase.fileno` akan dipanggil jika ada; metode "
90+
"harus mengembalikan bilangan bulat, yang dikembalikan sebagai nilai "
91+
"deskriptor file. Menetapkan pengecualian dan mengembalikan ``-1`` jika "
92+
"gagal."
6593

6694
#: ../../c-api/file.rst:52
6795
msgid ""
6896
"Equivalent to ``p.readline([n])``, this function reads one line from the "
69-
"object *p*. *p* may be a file object or any object with a "
70-
":meth:`~io.IOBase.readline` method. If *n* is ``0``, exactly one line is "
71-
"read, regardless of the length of the line. If *n* is greater than ``0``, "
72-
"no more than *n* bytes will be read from the file; a partial line can be "
73-
"returned. In both cases, an empty string is returned if the end of the file"
74-
" is reached immediately. If *n* is less than ``0``, however, one line is "
75-
"read regardless of length, but :exc:`EOFError` is raised if the end of the "
76-
"file is reached immediately."
77-
msgstr ""
97+
"object *p*. *p* may be a file object or any object with a :meth:`~io."
98+
"IOBase.readline` method. If *n* is ``0``, exactly one line is read, "
99+
"regardless of the length of the line. If *n* is greater than ``0``, no "
100+
"more than *n* bytes will be read from the file; a partial line can be "
101+
"returned. In both cases, an empty string is returned if the end of the "
102+
"file is reached immediately. If *n* is less than ``0``, however, one line "
103+
"is read regardless of length, but :exc:`EOFError` is raised if the end of "
104+
"the file is reached immediately."
105+
msgstr ""
106+
"Setara dengan ``p.readline([n])``, fungsi ini membaca satu baris dari objek "
107+
"*p*. *p* dapat berupa objek file atau objek apa pun dengan metode :meth:"
108+
"`~io.IOBase.readline`. Jika *n* adalah ``0``, tepat satu baris terbaca, "
109+
"berapa pun panjang barisnya. Jika *n* lebih besar dari ``0``, tidak lebih "
110+
"dari *n* byte yang akan dibaca dari file; garis parsial dapat dikembalikan. "
111+
"Dalam kedua kasus, string kosong dikembalikan jika akhir file dicapai "
112+
"dengan segera. Jika *n* lebih kecil dari ``0``, bagaimanapun, satu baris "
113+
"dibaca berapa pun panjangnya, tapi :exc:`EOFError` dimunculkan jika akhir "
114+
"file dicapai dengan segera."
78115

79116
#: ../../c-api/file.rst:65
80117
msgid ""
81118
"Overrides the normal behavior of :func:`io.open_code` to pass its parameter "
82119
"through the provided handler."
83120
msgstr ""
121+
"Mengganti perilaku normal :func:`io.open_code` untuk meneruskan "
122+
"parameternya melalui penangan yang disediakan."
84123

85124
#: ../../c-api/file.rst:68
86125
msgid ""
87126
"The handler is a function of type :c:type:`PyObject *(\\*)(PyObject *path, "
88-
"void *userData)`, where *path* is guaranteed to be "
89-
":c:type:`PyUnicodeObject`."
127+
"void *userData)`, where *path* is guaranteed to be :c:type:"
128+
"`PyUnicodeObject`."
90129
msgstr ""
130+
"Handler adalah fungsi dari tipe :c:type:`PyObject *(\\*)(PyObject *path, "
131+
"void *userData)`, di mana *path* dijamin menjadi :c:type:`PyUnicodeObject`."
91132

92133
#: ../../c-api/file.rst:71
93134
msgid ""
94135
"The *userData* pointer is passed into the hook function. Since hook "
95136
"functions may be called from different runtimes, this pointer should not "
96137
"refer directly to Python state."
97138
msgstr ""
139+
"Pointer *userData* diteruskan ke fungsi hook. Karena fungsi hook dapat "
140+
"dipanggil dari runtime yang berbeda, pointer ini tidak boleh merujuk "
141+
"langsung ke status Python."
98142

99143
#: ../../c-api/file.rst:75
100144
msgid ""
101145
"As this hook is intentionally used during import, avoid importing new "
102-
"modules during its execution unless they are known to be frozen or available"
103-
" in ``sys.modules``."
146+
"modules during its execution unless they are known to be frozen or "
147+
"available in ``sys.modules``."
104148
msgstr ""
149+
"Karena hook ini sengaja digunakan selama impor, hindari mengimpor modul "
150+
"baru selama eksekusinya kecuali jika mereka diketahui telah dibekukan atau "
151+
"tersedia di ``sys.modules``."
105152

106153
#: ../../c-api/file.rst:79
107154
msgid ""
108155
"Once a hook has been set, it cannot be removed or replaced, and later calls "
109156
"to :c:func:`PyFile_SetOpenCodeHook` will fail. On failure, the function "
110157
"returns -1 and sets an exception if the interpreter has been initialized."
111158
msgstr ""
159+
"Setelah hook diatur, hook tidak dapat dilepas atau diganti, dan panggilan "
160+
"ke :c:func:`PyFile_SetOpenCodeHook` akan gagal. Jika gagal, fungsi "
161+
"mengembalikan -1 dan mengatur pengecualian jika interpreter telah "
162+
"diinisialisasi."
112163

113164
#: ../../c-api/file.rst:83
114165
msgid "This function is safe to call before :c:func:`Py_Initialize`."
115-
msgstr ""
166+
msgstr "Fungsi ini aman untuk dipanggil sebelum :c:func:`Py_Initialize`."
116167

117168
#: ../../c-api/file.rst:86
118169
msgid ""
@@ -123,13 +174,20 @@ msgstr ""
123174
#: ../../c-api/file.rst:95
124175
msgid ""
125176
"Write object *obj* to file object *p*. The only supported flag for *flags* "
126-
"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is written"
127-
" instead of the :func:`repr`. Return ``0`` on success or ``-1`` on failure;"
128-
" the appropriate exception will be set."
177+
"is :const:`Py_PRINT_RAW`; if given, the :func:`str` of the object is "
178+
"written instead of the :func:`repr`. Return ``0`` on success or ``-1`` on "
179+
"failure; the appropriate exception will be set."
129180
msgstr ""
181+
"Menulis objek *obj* ke file objek *p*. Satu-satunya tanda yang didukung "
182+
"untuk *flags* adalah :const:`Py_PRINT_RAW`; jika diberikan, fungsi :func:"
183+
"`str` dari objek akan dituliskan sebagai pengganti :func:`repr`. "
184+
"Mengembalikan ``0`` saat sukses atau ``-1`` saat gagal; pengecualian yang "
185+
"sesuai akan ditetapkan."
130186

131187
#: ../../c-api/file.rst:103
132188
msgid ""
133189
"Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on "
134190
"failure; the appropriate exception will be set."
135191
msgstr ""
192+
"Menulis string *s* ke file objek *p*. Mengembalikan ``0`` saat sukses atau "
193+
"``-1`` saat gagal; pengecualian yang sesuai akan ditetapkan."

c-api/float.po

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,125 @@
22
# Copyright (C) 2001-2021, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5-
#
6-
#, fuzzy
5+
#
6+
# Translators:
7+
# Elmo Allistair, 2021
8+
#
79
msgid ""
810
msgstr ""
911
"Project-Id-Version: Python 3.9\n"
1012
"Report-Msgid-Bugs-To: \n"
1113
"POT-Creation-Date: 2021-01-07 05:06+0000\n"
12-
"PO-Revision-Date: 2017-02-16 17:35+0000\n"
14+
"PO-Revision-Date: 2021-04-02 20:30+0700\n"
15+
"Last-Translator: Elmo Allistair, 2021\n"
1316
"Language-Team: Indonesian (https://www.transifex.com/python-doc/teams/5390/id/)\n"
1417
"MIME-Version: 1.0\n"
1518
"Content-Type: text/plain; charset=UTF-8\n"
1619
"Content-Transfer-Encoding: 8bit\n"
1720
"Language: id\n"
1821
"Plural-Forms: nplurals=1; plural=0;\n"
22+
"Last-Translator: \n"
23+
"X-Generator: Poedit 2.2\n"
1924

2025
#: ../../c-api/float.rst:6
2126
msgid "Floating Point Objects"
22-
msgstr ""
27+
msgstr "Objek Pecahan"
2328

2429
#: ../../c-api/float.rst:13
2530
msgid ""
2631
"This subtype of :c:type:`PyObject` represents a Python floating point "
2732
"object."
28-
msgstr ""
33+
msgstr "Subtipe dari :c:type:`PyObject` ini mewakili objek pecahan Python."
2934

3035
#: ../../c-api/float.rst:18
3136
msgid ""
32-
"This instance of :c:type:`PyTypeObject` represents the Python floating point"
33-
" type. This is the same object as :class:`float` in the Python layer."
37+
"This instance of :c:type:`PyTypeObject` represents the Python floating "
38+
"point type. This is the same object as :class:`float` in the Python layer."
3439
msgstr ""
40+
"Instance dari :c:type:`PyTypeObject` ini mewakili tipe pecahan Python. Ini "
41+
"adalah objek yang sama dengan :class:`float` di lapisan Python."
3542

3643
#: ../../c-api/float.rst:24
3744
msgid ""
3845
"Return true if its argument is a :c:type:`PyFloatObject` or a subtype of "
3946
":c:type:`PyFloatObject`. This function always succeeds."
4047
msgstr ""
48+
"Mengambalikan nilai true jika argumennya adalah :c:type:`PyFloatObject` "
49+
"atau subtipe dari :c:type:`PyFloatObject`. Fungsi ini selalu sukses."
4150

4251
#: ../../c-api/float.rst:30
4352
msgid ""
4453
"Return true if its argument is a :c:type:`PyFloatObject`, but not a subtype "
4554
"of :c:type:`PyFloatObject`. This function always succeeds."
4655
msgstr ""
56+
"Mengambalikan nilai true jika argumennya adalah :c:type:`PyFloatObject`, "
57+
"tetapi bukan subtipe dari :c:type:`PyFloatObject`."
4758

4859
#: ../../c-api/float.rst:36
4960
msgid ""
5061
"Create a :c:type:`PyFloatObject` object based on the string value in *str*, "
5162
"or ``NULL`` on failure."
5263
msgstr ""
64+
"Membuat objek :c:type:`PyFloatObject` berdasarkan nilai string di *str*, "
65+
"atau ``NULL`` jika gagal."
5366

5467
#: ../../c-api/float.rst:42
5568
msgid ""
5669
"Create a :c:type:`PyFloatObject` object from *v*, or ``NULL`` on failure."
5770
msgstr ""
71+
"Membuat objek :c:type:`PyFloatObject` dari *v*, atau ``NULL`` jika gagal."
5872

5973
#: ../../c-api/float.rst:47
6074
msgid ""
61-
"Return a C :c:type:`double` representation of the contents of *pyfloat*. If"
62-
" *pyfloat* is not a Python floating point object but has a :meth:`__float__`"
63-
" method, this method will first be called to convert *pyfloat* into a float."
64-
" If ``__float__()`` is not defined then it falls back to :meth:`__index__`. "
65-
"This method returns ``-1.0`` upon failure, so one should call "
66-
":c:func:`PyErr_Occurred` to check for errors."
75+
"Return a C :c:type:`double` representation of the contents of *pyfloat*. "
76+
"If *pyfloat* is not a Python floating point object but has a :meth:"
77+
"`__float__` method, this method will first be called to convert *pyfloat* "
78+
"into a float. If ``__float__()`` is not defined then it falls back to :meth:"
79+
"`__index__`. This method returns ``-1.0`` upon failure, so one should call :"
80+
"c:func:`PyErr_Occurred` to check for errors."
6781
msgstr ""
82+
"Mengembalikan representasi C :c:type:`double` dari konten *pyfloat*. Jika "
83+
"*pyfloat* bukan objek pecahan Python tetapi memiliki metode :meth:"
84+
"`__float__`, metode ini pertama-tama akan dipanggil untuk mengubah "
85+
"*pyfloat* menjadi float. Jika ``__float__ ()`` tidak ditentukan maka "
86+
"kembali ke :meth:`__index__`. Metode ini mengembalikan ``-1.0`` setelah "
87+
"gagal, jadi seseorang harus memanggil :c:func:`PyErr_Occurred` untuk "
88+
"memeriksa kesalahan."
6889

6990
#: ../../c-api/float.rst:54
7091
msgid "Use :meth:`__index__` if available."
71-
msgstr ""
92+
msgstr "Gunakan :meth:`__index__` jika tersedia."
7293

7394
#: ../../c-api/float.rst:60
7495
msgid ""
75-
"Return a C :c:type:`double` representation of the contents of *pyfloat*, but"
76-
" without error checking."
96+
"Return a C :c:type:`double` representation of the contents of *pyfloat*, "
97+
"but without error checking."
7798
msgstr ""
99+
"Mengembalikan representasi C :c:type:`double` dari konten *pyfloat*, tetapi "
100+
"tanpa pemeriksaan error."
78101

79102
#: ../../c-api/float.rst:66
80103
msgid ""
81104
"Return a structseq instance which contains information about the precision, "
82-
"minimum and maximum values of a float. It's a thin wrapper around the header"
83-
" file :file:`float.h`."
105+
"minimum and maximum values of a float. It's a thin wrapper around the "
106+
"header file :file:`float.h`."
84107
msgstr ""
108+
"Mengembalikan instance structseq yang berisi informasi tentang presisi, "
109+
"nilai minimum dan maksimum float. Ini adalah pembungkus tipis di sekitar "
110+
"file header :file:`float.h`."
85111

86112
#: ../../c-api/float.rst:73
87113
msgid ""
88-
"Return the maximum representable finite float *DBL_MAX* as C "
89-
":c:type:`double`."
114+
"Return the maximum representable finite float *DBL_MAX* as C :c:type:"
115+
"`double`."
90116
msgstr ""
117+
"Mengembalikan float maksimum yang dapat direpresentasikan *DBL_MAX* sebagai "
118+
"C :c:type:`double`."
91119

92120
#: ../../c-api/float.rst:78
93121
msgid ""
94-
"Return the minimum normalized positive float *DBL_MIN* as C "
95-
":c:type:`double`."
122+
"Return the minimum normalized positive float *DBL_MIN* as C :c:type:"
123+
"`double`."
96124
msgstr ""
125+
"Mengembalikan float positif minimum yang dinormalisasi *DBL_MIN* sebagai C :"
126+
"c:type:`double`."

0 commit comments

Comments
 (0)