Skip to content

Commit

Permalink
login [nfc]: Document need for "server URL" hint value to be reserved
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Feb 8, 2025
1 parent c6db6aa commit 0417c87
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/widgets/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<AddAccountPage> createState() => _AddAccountPageState();
}
Expand Down Expand Up @@ -233,7 +247,7 @@ class _AddAccountPageState extends State<AddAccountPage> {
labelText: zulipLocalizations.loginServerUrlLabel,
errorText: errorText,
helperText: kLayoutPinningHelperText,
hintText: 'your-org.zulipchat.com')),
hintText: AddAccountPage._serverUrlHint)),
const SizedBox(height: 8),
ElevatedButton(
onPressed: !_inProgress && errorText == null
Expand Down

0 comments on commit 0417c87

Please sign in to comment.