mirror of
https://github.com/rememberber/MooTool.git
synced 2026-12-01 03:18:19 +08:00
Translate body kinds, field editors, multipart UI, cURL import, and request library dialogs; document scope in parity.md. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.2 KiB
Swift
33 lines
1.2 KiB
Swift
import MooToolNextCore
|
|
|
|
enum HTTPRequestTab: String, CaseIterable, Identifiable {
|
|
case params, headers, cookies, body
|
|
var id: String { rawValue }
|
|
func title(language: AppLanguage) -> String {
|
|
switch self {
|
|
case .params: return AppLocalization.string("http.tab.params", language: language)
|
|
case .headers: return AppLocalization.string("http.tab.headers", language: language)
|
|
case .cookies: return AppLocalization.string("http.tab.cookies", language: language)
|
|
case .body: return AppLocalization.string("http.tab.body", language: language)
|
|
}
|
|
}
|
|
}
|
|
|
|
extension HTTPBodyKind {
|
|
func title(language: AppLanguage) -> String {
|
|
AppLocalization.string("http.bodyKind.\(rawValue)", language: language)
|
|
}
|
|
}
|
|
|
|
enum HTTPResponseTab: String, CaseIterable, Identifiable {
|
|
case body, headers, cookies
|
|
var id: String { rawValue }
|
|
func title(language: AppLanguage) -> String {
|
|
switch self {
|
|
case .body: return AppLocalization.string("http.tab.body", language: language)
|
|
case .headers: return AppLocalization.string("http.tab.headers", language: language)
|
|
case .cookies: return AppLocalization.string("http.tab.cookies", language: language)
|
|
}
|
|
}
|
|
}
|