╭ changed ─────────────╮ │src/ui/Repo/Issues.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────╮ │353 │ │354 pub const Header = thread.Header; │ │355 │ │356 +const open_tab_label = "open"; │ │357 +const closed_tab_label = "closed"; │ │358 +const tags_tab_label = "tags"; │ │359 +const edit_tab_label = "edit"; │ │360 +const reply_tab_label = "reply"; │ │361 +const remove_tab_label = "remove"; │ │362 +const resolve_tab_label = "resolve"; │ │363 +const new_tab_label = "new"; │ │364 +const conflicts_tab_label = "conflicts"; │ │365 + │ │366 // tabs switching between the issues page's views │ │367 pub fn initHeader(allocator: std.mem.Allocator, session: *ui.Session, data: *const Self) !Header {│ │368 var header = try Header.init(allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │372 const page_selected = std.meta.activeTag(session.data.current_page) == .repo_issues; │ │373 │ │374 // a list tab per status, labeled with its listing's issue count │ │365 - for ([_]evt.Issue.Status{ .open, .closed }, 0..) |status, index| { │ │375 + const status_labels = [_][]const u8{ open_tab_label, closed_tab_label }; │ │376 + for ([_]evt.Issue.Status{ .open, .closed }, status_labels, 0..) |status, status_label, index| { │ │377 const route = ui.RoutablePage.repoIssuesRoute(data.identity, status, data.tag, "") orelse return error.RouteTooLong;│ │378 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == index); │ │379 var label_buf: [64]u8 = undefined; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │369 - const label = try std.fmt.bufPrint(&label_buf, "{s} ({d})", .{ @tagName(status), data.window(status).count });│ │380 + const label = try std.fmt.bufPrint(&label_buf, "{s} ({d})", .{ status_label, data.window(status).count }); │ │381 try header.addTab(allocator, label, link, index); │ │382 } │ │383 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │385 { │ │386 const tags_route = ui.RoutablePage.repoThreadTagsRoute(.issue, data.identity, data.tag) orelse return error.RouteTooLong;│ │387 const tags_link = try ui.inPageTabLink(session, tags_route, page_selected and selected_index == View.viewIndex(.tags)); │ │377 - const label = if (data.tag.len == 0) "tags" else blk: { │ │388 + const label = if (data.tag.len == 0) tags_tab_label else blk: { │ │389 const decoded = std.Uri.percentDecodeInPlace(try aa.dupe(u8, data.tag)); │ │379 - break :blk try std.fmt.allocPrint(aa, "tags ({s})", .{decoded}); │ │390 + break :blk try std.fmt.allocPrint(aa, tags_tab_label ++ " ({s})", .{decoded}); │ │391 }; │ │392 try header.addTab(allocator, label, tags_link, View.viewIndex(.tags)); │ │393 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │404 }; │ │405 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == View.viewIndex(.new));│ │406 const label: []const u8 = switch (data.view) { │ │396 - .edit => "edit", │ │397 - .new_comment => "reply", │ │398 - .edit_comment => "edit", │ │399 - .remove => "remove", │ │400 - .resolve => "resolve", │ │401 - else => "new", │ │407 + .edit => edit_tab_label, │ │408 + .new_comment => reply_tab_label, │ │409 + .edit_comment => edit_tab_label, │ │410 + .remove => remove_tab_label, │ │411 + .resolve => resolve_tab_label, │ │412 + else => new_tab_label, │ │413 }; │ │414 try header.addTab(allocator, label, link, View.viewIndex(.new)); │ │415 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │419 const route = ui.RoutablePage.repoIssuesConflictsRoute(data.identity, "") orelse return error.RouteTooLong; │ │420 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == View.viewIndex(.conflicts));│ │421 var label_buf: [64]u8 = undefined; │ │411 - const label = try std.fmt.bufPrint(&label_buf, "conflicts ({d})", .{data.conflicts.count}); │ │422 + const label = try std.fmt.bufPrint(&label_buf, conflicts_tab_label ++ " ({d})", .{data.conflicts.count}); │ │423 try header.addTab(allocator, label, link, View.viewIndex(.conflicts)); │ │424 } │ │425 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯