From 85360ca382bc0030dc5ae13063e2ca3b5c8f69d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A8ritable=20Hacker?= Date: Sun, 4 Jan 2026 18:50:12 +0300 Subject: [PATCH] English Turkish translation added. --- pages/philosophy.js | 303 ++++++++++++++++++++++++++++---------------- 1 file changed, 197 insertions(+), 106 deletions(-) diff --git a/pages/philosophy.js b/pages/philosophy.js index d53fc728f..1210f68be 100644 --- a/pages/philosophy.js +++ b/pages/philosophy.js @@ -1,9 +1,10 @@ import Meta from '@happyhackingspace/meta' import Head from 'next/head' -import { Box, Heading, Container, Text, Button, Link } from 'theme-ui' +import { Box, Heading, Container, Text, Button, Link, Flex } from 'theme-ui' import Nav from '../components/nav' import styled from '@emotion/styled' import Footer from '../components/footer' +import { useEffect, useMemo, useState } from 'react' const Header = styled(Box)` color: white; @@ -75,8 +76,6 @@ const Ultraline = styled(Heading)` } ` - - const Row = styled(Container)` px: 3; py: [3, 4]; @@ -106,16 +105,113 @@ const Super = styled(Text)` ` export default function Philosophy() { + const [lang, setLang] = useState('en') + + useEffect(() => { + try { + const saved = window.localStorage.getItem('hhs_lang') + if (saved === 'tr' || saved === 'en') setLang(saved) + } catch (e) {} + }, []) + + useEffect(() => { + try { + window.localStorage.setItem('hhs_lang', lang) + } catch (e) {} + }, [lang]) + + const copy = useMemo( + () => ({ + en: { + metaTitle: 'Philosophy', + metaDescription: + 'Read about Happy Hacking Space, a network of hackers. We want to make building apps and websites accessible to everyone.', + hero: ["We're", 'at our best', "when we're", 'hacking.'], + sealTop: 'Happy Hacking Space', + sealBottom: 'Philosophy', + section1TitlePrefix: 'Coding is a ', + section1Super: 'superpower.', + section1Body: + 'Learning to code is uniquely like gaining a superpower: it converts you from a consumer to a creator. Suddenly, computers become a tool for creating.', + section2Title: 'Make, from anywhere.', + section2Body: + 'There’s never been a better time for making: anywhere in the world, anyone with a laptop and an internet connection can learn to make an app. Building things has never been so globally democratized.', + section3Title: 'Hack, hack, hack.', + section3BodyStrong: + 'The goal of Happy Hacking Space is to help you become a hacker.', + section3BodyRest: + ' We want a space at every place where people are making interesting things with code, every week. Schools or institutions don’t provide that, so we’re creating it in every place to make building things accessible to everyone.', + section4Title: 'Start building.', + section4Body: + 'Most coding classes teach you programming concepts instead of how to write real code—it’s like trying to learn carpentry without any wood. So at Happy Hacking Space, you learn to code entirely through building things. You start with no experience and build and ship a project every meeting.', + section5Title: 'Learn as you build.', + section5BodyBeforeLink: + 'Just as the best carpenters didn’t learn in the classroom, neither did the best programmers. Through our ', + section5LinkText: 'workshops', + section5BodyAfterLink: + ', you’ll be walked through building projects. Starting out, you won’t understand how the code works, but you’ll build understanding as you go. You’ll get stuck along the way, but we’re here to help.', + section6Title: 'Be part of a community.', + section6Body: + 'Happy Hacking Space gives you a community of thousands of other makers to talk to. We’re artists, writers, engineers, tinkerers, campers, filmmakers, volunteers. We make things. We help one another. We have fun. Join us.', + ctaTitle: 'Join the movement!', + ctaButton: 'Join our community', + langLabel: 'Language', + tr: 'TR', + en: 'EN' + }, + tr: { + metaTitle: 'Felsefe', + metaDescription: + 'Happy Hacking Space’in ne olduğunu ve neyi amaçladığını oku. Uygulama ve web sitesi üretmeyi herkes için erişilebilir kılmak istiyoruz.', + hero: ['Biz', 'en iyi halimizde', 'biz olduğumuzda', 'hack’leriz.'], + sealTop: 'Happy Hacking Space', + sealBottom: 'Felsefe', + section1TitlePrefix: 'Kodlama bir ', + section1Super: 'süper güç.', + section1Body: + 'Kod yazmayı öğrenmek, adeta bir süper güç kazanmak gibidir: seni tüketiciden yaratıcıya dönüştürür. Birdenbire bilgisayarlar, üretmek için bir araca dönüşür.', + section2Title: 'Her yerden üret.', + section2Body: + 'Üretmek için hiç bu kadar iyi bir zaman olmamıştı: dünyanın neresinde olursan ol, bir dizüstü bilgisayar ve internet bağlantısı olan herkes bir uygulama yapmayı öğrenebilir. Bir şey inşa etmek artık küresel ölçekte daha erişilebilir.', + section3Title: 'Hack, hack, hack.', + section3BodyStrong: + 'Happy Hacking Space’in hedefi, senin bir hacker olmanı sağlamak.', + section3BodyRest: + ' Her hafta, kodla ilginç şeyler üreten insanların buluştuğu bir alan istiyoruz. Okullar ya da kurumlar bunu çoğu zaman sağlamıyor; biz de her yerde bunu kurmaya çalışıyoruz—üretmeyi herkes için erişilebilir kılmak için.', + section4Title: 'Üretmeye başla.', + section4Body: + 'Çoğu kodlama dersi gerçek kod yazmaktan çok kavram öğretir—tahta olmadan marangozluk öğrenmeye benzer. Happy Hacking Space’te ise kod yazmayı tamamen bir şeyler inşa ederek öğrenirsin. Hiç deneyimin olmadan başlarsın ve her buluşmada bir proje yapıp yayınlarsın.', + section5Title: 'Yaparken öğren.', + section5BodyBeforeLink: + 'En iyi marangozlar sınıfta öğrenmediği gibi, en iyi programcılar da öyle. ', + section5LinkText: 'atölyelerimiz', + section5BodyAfterLink: + ' ile projeler yaparken adım adım yönlendirilirsin. Başta kodun nasıl çalıştığını tam anlamayabilirsin ama ilerledikçe oturur. Takıldığın yerde de biz buradayız.', + section6Title: 'Bir topluluğun parçası ol.', + section6Body: + 'Happy Hacking Space, konuşabileceğin binlerce üreticiden oluşan bir topluluk sunar. Sanatçılar, yazarlar, mühendisler, tamirciler, kampçılar, filmciler, gönüllüler… Üretiriz. Birbirimize yardım ederiz. Eğleniriz. Katıl.', + ctaTitle: 'Harekete katıl!', + ctaButton: 'Topluluğa katıl', + langLabel: 'Dil', + tr: 'TR', + en: 'EN' + } + }), + [] + ) + + const t = (key) => copy[lang]?.[key] ?? copy.en[key] ?? key + return (