fix(workout-builder): use navigation namespace for screen title translation

This commit is contained in:
2026-08-11 16:49:35 +02:00
parent 070429627b
commit 522337d332
@@ -13,6 +13,7 @@ const STROKES: StrokeType[] = ["Freestyle", "Backstroke", "Breaststroke", "Butte
export function BuilderScreen() { export function BuilderScreen() {
const { t } = useTranslation("workout"); const { t } = useTranslation("workout");
const { t: tc } = useTranslation("common"); const { t: tc } = useTranslation("common");
const { t: tb } = useTranslation("navigation");
const navigation = useNavigation<NativeStackNavigationProp<RootStackParamList>>(); const navigation = useNavigation<NativeStackNavigationProp<RootStackParamList>>();
const { poolLength: defaultPoolLength } = useSettings(); const { poolLength: defaultPoolLength } = useSettings();
const [poolLength, setPoolLength] = useState(defaultPoolLength); const [poolLength, setPoolLength] = useState(defaultPoolLength);
@@ -47,7 +48,7 @@ export function BuilderScreen() {
> >
<ScrollView className="flex-1 bg-white" contentContainerStyle={{ paddingBottom: 40 }}> <ScrollView className="flex-1 bg-white" contentContainerStyle={{ paddingBottom: 40 }}>
<View className="p-4"> <View className="p-4">
<Text className="text-2xl font-bold text-slate-900 mb-1">{t("buildWorkout")}</Text> <Text className="text-2xl font-bold text-slate-900 mb-1">{tb("buildWorkout")}</Text>
<Text className="text-slate-500 mb-4"> <Text className="text-slate-500 mb-4">
{totalDistance}m total · {tc("pool", { length: poolLength })} {totalDistance}m total · {tc("pool", { length: poolLength })}
</Text> </Text>