diff --git a/lib/widgets/login.dart b/lib/widgets/login.dart index a970d8059c..195bf75e62 100644 --- a/lib/widgets/login.dart +++ b/lib/widgets/login.dart @@ -115,6 +115,20 @@ class AddAccountPage extends StatefulWidget { return _LoginSequenceRoute(page: const AddAccountPage()); } + /// The hint text to show in the "Zulip server URL" input. + /// + /// If this contains an example value, it must be one that has been reserved + /// so that it cannot point to a real Zulip realm (nor any unknown other site). + /// The realm name `your-org` under zulipchat.com is reserved for this reason. + /// See discussion: + /// https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/flutter.3A.20login.20URL/near/1570347 + // TODO(i18n): In principle this should be translated, because it's trying to + // convey to the user the English phrase "your org". But doing that is + // tricky because of the need to have the example name reserved. + // Realistically that probably means we'll only ever translate this for + // at most a handful of languages, most likely none. + static const _serverUrlHint = 'your-org.zulipchat.com'; + @override State createState() => _AddAccountPageState(); } @@ -233,7 +247,7 @@ class _AddAccountPageState extends State { labelText: zulipLocalizations.loginServerUrlLabel, errorText: errorText, helperText: kLayoutPinningHelperText, - hintText: 'your-org.zulipchat.com')), + hintText: AddAccountPage._serverUrlHint)), const SizedBox(height: 8), ElevatedButton( onPressed: !_inProgress && errorText == null